Skip to content

Commit

Permalink
Add alias for PHPUnit\Framework\Error\Notice
Browse files Browse the repository at this point in the history
  • Loading branch information
garas committed Sep 26, 2018
1 parent b9862ed commit ae397d7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions tests/TestCase/Controller/ControllerTest.php
Expand Up @@ -300,11 +300,7 @@ public function testUndefinedPropertyError()
$controller->Bar = true;
$this->assertTrue($controller->Bar);

if (class_exists(Notice::class)) {
$this->expectException(Notice::class);
} else {
$this->expectException(\PHPUnit_Framework_Error_Notice::class);
}
$this->expectException(Notice::class);
$this->expectExceptionMessage(sprintf(
'Undefined property: Controller::$Foo in %s on line %s',
__FILE__,
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit_aliases.php
Expand Up @@ -11,6 +11,7 @@ class_alias('PHPUnit_Framework_TestSuite', 'PHPUnit\Framework\TestSuite');
class_alias('PHPUnit_Framework_TestResult', 'PHPUnit\Framework\TestResult');
class_alias('PHPUnit_Framework_Error', 'PHPUnit\Framework\Error\Error');
class_alias('PHPUnit_Framework_Error_Deprecated', 'PHPUnit\Framework\Error\Deprecated');
class_alias('PHPUnit_Framework_Error_Notice', 'PHPUnit\Framework\Error\Notice');
class_alias('PHPUnit_Framework_Error_Warning', 'PHPUnit\Framework\Error\Warning');
class_alias('PHPUnit_Framework_ExpectationFailedException', 'PHPUnit\Framework\ExpectationFailedException');
}
Expand Down

0 comments on commit ae397d7

Please sign in to comment.