Skip to content
Permalink
Browse files

Allowing tests to run on PHP 7

  • Loading branch information...
Larry E. Masters
Larry E. Masters committed Dec 13, 2015
1 parent dcac9c4 commit 48e018e70769ccee0888bfdb1bdb09adaf528fc7
@@ -51,9 +51,11 @@ public function setUp() {
* @return void
*/
public function testControllerTypeError() {
$this->skipIf(version_compare(PHP_VERSION, '7.0', '<='), 'PHP Type Error in PHP7+');
$this->auth->controller(new StdClass());
try {
$this->auth->controller(new StdClass());
} catch (Throwable $t) {
throw new PHPUnit_Framework_Error($t);
}
}
/**
@@ -454,7 +454,12 @@ public function testReaderSetup() {
*/
public function testReaderExceptionOnIncorrectClass() {
$reader = new StdClass();
Configure::config('test', $reader);
try {
Configure::config('test', $reader);
} catch (Throwable $t) {
throw new PHPUnit_Framework_Error($t);
}
}
/**
@@ -2912,7 +2912,11 @@ public function testSchema() {
* @return void
*/
public function testDropSchemaNoSchema() {
$this->Dbo->dropSchema(null);
try {
$this->Dbo->dropSchema(null);
} catch (Throwable $t) {
throw new PHPUnit_Framework_Error($t);
}
}
/**
@@ -2227,7 +2227,11 @@ public function testValidatorOverride() {
* @return void
*/
public function testValidatorTypehintException() {
new ModelValidator('asdasds');
try {
new ModelValidator('asdasds');
} catch (Throwable $t) {
throw new PHPUnit_Framework_Error($t);
}
}
/**

0 comments on commit 48e018e

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