Skip to content

Commit 69f50b5

Browse files
committed
Remove phinx backend test from 5.x
The phinx backend was removed in 5.x, so the test for MigrationsRollbackCommand is not applicable. This test was incorrectly merged from 4.x where phinx backend still exists.
1 parent e81ee71 commit 69f50b5

File tree

1 file changed

+2
-24
lines changed

1 file changed

+2
-24
lines changed

tests/TestCase/MigrationsPluginTest.php

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,22 @@
44
namespace Migrations\Test\TestCase;
55

66
use Cake\Console\CommandCollection;
7-
use Cake\Core\Configure;
87
use Cake\TestSuite\TestCase;
9-
use Migrations\Command\MigrationsRollbackCommand;
108
use Migrations\Command\RollbackCommand;
119
use Migrations\MigrationsPlugin;
1210

1311
class MigrationsPluginTest extends TestCase
1412
{
1513
/**
16-
* Test that builtin backend uses RollbackCommand
14+
* Test that console() registers RollbackCommand
1715
*/
18-
public function testConsoleBuiltinBackendUsesCorrectRollbackCommand(): void
16+
public function testConsoleRegistersRollbackCommand(): void
1917
{
20-
Configure::write('Migrations.backend', 'builtin');
21-
2218
$plugin = new MigrationsPlugin();
2319
$commands = new CommandCollection();
2420
$commands = $plugin->console($commands);
2521

2622
$this->assertTrue($commands->has('migrations rollback'));
2723
$this->assertSame(RollbackCommand::class, $commands->get('migrations rollback'));
2824
}
29-
30-
/**
31-
* Test that phinx backend uses MigrationsRollbackCommand
32-
*
33-
* This is the reported bug in https://github.com/cakephp/migrations/issues/990
34-
*/
35-
public function testConsolePhinxBackendUsesCorrectRollbackCommand(): void
36-
{
37-
Configure::write('Migrations.backend', 'phinx');
38-
39-
$plugin = new MigrationsPlugin();
40-
$commands = new CommandCollection();
41-
$commands = $plugin->console($commands);
42-
43-
$this->assertTrue($commands->has('migrations rollback'));
44-
// Bug: RollbackCommand is loaded instead of MigrationsRollbackCommand
45-
$this->assertSame(MigrationsRollbackCommand::class, $commands->get('migrations rollback'));
46-
}
4725
}

0 commit comments

Comments
 (0)