diff --git a/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc b/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.1.inc similarity index 92% rename from src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc rename to src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.1.inc index 725c60ed69..b6df38c9dc 100644 --- a/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.inc +++ b/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.1.inc @@ -47,7 +47,3 @@ $a = $b !== null default => 5, } : new Foo; - -// Intentional parse error. This must be the last test in the file. -function new -?> diff --git a/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.2.inc b/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.2.inc new file mode 100644 index 0000000000..f41504bd2a --- /dev/null +++ b/src/Standards/Squiz/Tests/Objects/ObjectInstantiationUnitTest.2.inc @@ -0,0 +1,4 @@ + */ - public function getErrorList() + public function getErrorList($testFile='') { - return [ - 5 => 1, - 8 => 1, - 31 => 1, - 39 => 2, - ]; + switch ($testFile) { + case 'ObjectInstantiationUnitTest.1.inc': + return [ + 5 => 1, + 8 => 1, + 31 => 1, + 39 => 2, + ]; + + default: + return []; + }//end switch }//end getErrorList()