Skip to content

Commit

Permalink
reduce usage of error_reporting()
Browse files Browse the repository at this point in the history
  • Loading branch information
saeideng committed Oct 21, 2017
1 parent 9fa798e commit 4091a9b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/TestCase/Database/Schema/TableTest.php
Expand Up @@ -515,7 +515,7 @@ public function testPrimaryKey()
}

/**
* Test the options method.
* Test the setOptions/getOptions methods.
*
* @return void
*/
Expand All @@ -538,15 +538,15 @@ public function testOptions()
*/
public function testOptionsDeprecated()
{
$errorLevel = error_reporting(E_ALL & ~E_USER_DEPRECATED);
$table = new Table('articles');
$options = [
'engine' => 'InnoDB'
];
$return = $table->options($options);
$this->assertInstanceOf('Cake\Database\Schema\Table', $return);
$this->assertEquals($options, $table->options());
error_reporting($errorLevel);
$this->deprecated(function () use ($table, $options) {
$return = $table->options($options);
$this->assertInstanceOf('Cake\Database\Schema\Table', $return);
$this->assertEquals($options, $table->options());
});
}

/**
Expand Down

0 comments on commit 4091a9b

Please sign in to comment.