Skip to content

Commit

Permalink
Fix failing test in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 6, 2024
1 parent fab711c commit 3e3b537
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/TestCase/Command/RollbackCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Cake\Console\TestSuite\ConsoleIntegrationTestTrait;
use Cake\Core\Configure;
use Cake\Database\Exception\DatabaseException;
use Cake\Datasource\ConnectionManager;
use Cake\Event\EventInterface;
use Cake\Event\EventManager;
use Cake\TestSuite\TestCase;
Expand Down Expand Up @@ -202,12 +203,15 @@ public function testTargetOption(): void
public function testPluginOption(): void
{
$this->loadPlugins(['Migrator']);
$connection = ConnectionManager::get('test');
$connection->execute('DROP TABLE IF EXISTS migrator');

$this->exec('migrations migrate -c test --plugin Migrator --no-lock');
$this->assertExitSuccess();

// migration state was recorded.
$phinxlog = $this->fetchTable('MigratorPhinxlog');
$this->assertEquals(1, $phinxlog->find()->count());
$this->assertEquals(1, $phinxlog->find()->count(), 'migrate makes a row');
// Table was created.
$this->assertNotEmpty($this->fetchTable('Migrator')->getSchema());

Expand Down

0 comments on commit 3e3b537

Please sign in to comment.