File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -79,10 +79,16 @@ public function testLoadClassMetadataInAbstractClasses()
79
79
public function testLoadClassMetadataIgnoresAbstractMethods ()
80
80
{
81
81
$ loader = new StaticMethodLoader ('loadMetadata ' );
82
+ $ caught = false ;
82
83
try {
83
- include __DIR__ . '/AbstractMethodStaticLoader.php ' ;
84
- $ this ->fail ('AbstractMethodStaticLoader should produce a strict standard error. ' );
84
+ include __DIR__ .'/AbstractMethodStaticLoader.php ' ;
85
85
} catch (\Exception $ e ) {
86
+ // catching the PHP notice that is converted to an exception by PHPUnit
87
+ $ caught = true ;
88
+ }
89
+
90
+ if (!$ caught ) {
91
+ $ this ->fail ('AbstractMethodStaticLoader should produce a strict standard error. ' );
86
92
}
87
93
88
94
$ metadata = new ClassMetadata (__NAMESPACE__ .'\AbstractMethodStaticLoader ' );
You can’t perform that action at this time.
0 commit comments