Skip to content
Permalink
Browse files

Separated test since PHP 7 behaves differently

PHPUnit does not catch BaseException yet (introduced in PHP 7), so adding a separated test to verify it
  • Loading branch information...
jrbasso committed Mar 29, 2015
1 parent 57bcf5e commit 30bf826f40d19e5e3c6bce3f2b22256dbe661ea6
Showing with 18 additions and 2 deletions.
  1. +18 −2 tests/TestCase/Auth/ControllerAuthorizeTest.php
@@ -46,12 +46,28 @@ public function setUp()
}
/**
* @expectedException \PHPUnit_Framework_Error
* @return void
*/
public function testControllerTypeError()
{
$this->auth->controller(new \StdClass());
$this->skipIf(PHP_VERSION_ID >= 70000);
$this->setExpectedException('PHPUnit_Framework_Error');
$this->auth->controller(new \stdClass());
}
/**
* @return void
*/
public function testControllerTypeErrorPhp7()
{
$this->skipIf(PHP_VERSION_ID < 70000);
try {
$this->auth->controller(new \stdClass());
} catch (\BaseException $e) {
$this->assertTrue(true);
}
}
/**

0 comments on commit 30bf826

Please sign in to comment.
You can’t perform that action at this time.