diff --git a/tests/TestCase/Database/Schema/TableTest.php b/tests/TestCase/Database/Schema/TableTest.php index 71c148e1724..dfa7fe8dfae 100644 --- a/tests/TestCase/Database/Schema/TableTest.php +++ b/tests/TestCase/Database/Schema/TableTest.php @@ -515,7 +515,7 @@ public function testPrimaryKey() } /** - * Test the options method. + * Test the setOptions/getOptions methods. * * @return void */ @@ -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()); + }); } /**