create test from InitializationException
This commit is contained in:
35
tests/exception/InitializationExceptionTest.php
Normal file
35
tests/exception/InitializationExceptionTest.php
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @copyright NetMonsters <team@netmonsters.ru>
|
||||||
|
* @link http://netmonsters.ru
|
||||||
|
* @package Majestic
|
||||||
|
* @subpackage UnitTests
|
||||||
|
* @since 2011-11-24
|
||||||
|
*
|
||||||
|
* Unit tests for InitializationException class
|
||||||
|
*/
|
||||||
|
|
||||||
|
require_once dirname(__FILE__) . '/../../exception/InitializationException.php';
|
||||||
|
|
||||||
|
class InitializationExceptionTest extends PHPUnit_Framework_TestCase
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException InitializationException
|
||||||
|
*/
|
||||||
|
public function testInitializationException()
|
||||||
|
{
|
||||||
|
throw new InitializationException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @expectedException InitializationException
|
||||||
|
* @expectedExceptionMessage InitializationException message
|
||||||
|
* @excpectedExceptionCode 1
|
||||||
|
*/
|
||||||
|
public function testInitializationExceptionMessage()
|
||||||
|
{
|
||||||
|
throw new InitializationException('InitializationException message', 1);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user