mirror of
https://github.com/awslabs/aws-crt-php.git
synced 2026-08-17 17:47:12 +00:00
Only shim expectException if necessary (#27)
* Only shim expectException if necessary * Added missing entries to gitignore
This commit is contained in:
@@ -197,3 +197,5 @@ Makefile*
|
||||
/vendor/
|
||||
.idea/
|
||||
.DS_Store
|
||||
composer.lock
|
||||
PHP-Parser*/
|
||||
|
||||
+6
-3
@@ -22,8 +22,11 @@ abstract class CrtTestCase extends PHPUnit_Framework_TestCase {
|
||||
}
|
||||
}
|
||||
|
||||
// shim expectException -> setExpectedException for PHPUnit 4.8.x
|
||||
public function expectException($exceptionName) {
|
||||
$this->setExpectedException($exceptionName);
|
||||
// Shim missing calls in older versions of PHPUnit
|
||||
public function __call($name, $arguments) {
|
||||
// shim expectException -> setExpectedException for PHPUnit 4.8.x
|
||||
if ($name == 'expectException') {
|
||||
$this->setExpectedException($arguments[0]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user