[Validator] fixed wrong test
This commit is contained in:
parent
93926cae34
commit
a94b4e0ae2
|
@ -79,10 +79,16 @@ class StaticMethodLoaderTest extends \PHPUnit_Framework_TestCase
|
||||||
public function testLoadClassMetadataIgnoresAbstractMethods()
|
public function testLoadClassMetadataIgnoresAbstractMethods()
|
||||||
{
|
{
|
||||||
$loader = new StaticMethodLoader('loadMetadata');
|
$loader = new StaticMethodLoader('loadMetadata');
|
||||||
|
$caught = false;
|
||||||
try {
|
try {
|
||||||
include __DIR__ . '/AbstractMethodStaticLoader.php';
|
include __DIR__.'/AbstractMethodStaticLoader.php';
|
||||||
$this->fail('AbstractMethodStaticLoader should produce a strict standard error.');
|
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
// catching the PHP notice that is converted to an exception by PHPUnit
|
||||||
|
$caught = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$caught) {
|
||||||
|
$this->fail('AbstractMethodStaticLoader should produce a strict standard error.');
|
||||||
}
|
}
|
||||||
|
|
||||||
$metadata = new ClassMetadata(__NAMESPACE__.'\AbstractMethodStaticLoader');
|
$metadata = new ClassMetadata(__NAMESPACE__.'\AbstractMethodStaticLoader');
|
||||||
|
|
Reference in New Issue