Skip to content

Commit

Permalink
2288 - Add expectedDeprecation for CakePHP 4.5 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ajibarra committed Jun 7, 2024
1 parent 60b688d commit 49d9b99
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/Phinx/Db/Adapter/SQLiteAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1274,6 +1274,9 @@ public function testQueryBuilder()
->addColumn('int_col', 'integer')
->save();

$this->expectDeprecation();
$this->expectExceptionMessage('As of 4.5.0, using newQuery() is deprecated. Instead, use `insertQuery()`, `deleteQuery()`, `selectQuery()` or `updateQuery()`. The query objects returned by these methods will emit deprecations that will become fatal errors in 5.0.See https://book.cakephp.org/4/en/appendices/4-5-migration-guide.html for more information');

$builder = $this->adapter->getQueryBuilder();
$stm = $builder
->insert(['string_col', 'int_col'])
Expand Down

0 comments on commit 49d9b99

Please sign in to comment.