mirror of
https://gitee.com/hyperf/hyperf.git
synced 2024-12-06 05:38:10 +08:00
Update DatabaseGenMigrationCommandTest.php
Fixed DatabaseGenMigrationCommandTest.
This commit is contained in:
parent
ae692bd197
commit
7a0040cdca
@ -43,7 +43,7 @@ class DatabaseGenMigrationCommandTest extends TestCase
|
||||
$command = new GenMigrateCommand(
|
||||
$creator = Mockery::mock(MigrationCreator::class)
|
||||
);
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations', 'foo', true)->andReturn('');
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', BASE_PATH . DIRECTORY_SEPARATOR . 'migrations', 'foo', true)->andReturn('');
|
||||
|
||||
$this->runCommand($command, ['name' => 'create_foo']);
|
||||
}
|
||||
@ -53,7 +53,7 @@ class DatabaseGenMigrationCommandTest extends TestCase
|
||||
$command = new GenMigrateCommand(
|
||||
$creator = Mockery::mock(MigrationCreator::class)
|
||||
);
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations', 'foo', true)->andReturn('');
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', BASE_PATH . DIRECTORY_SEPARATOR . 'migrations', 'foo', true)->andReturn('');
|
||||
|
||||
$this->runCommand($command, ['name' => 'CreateFoo']);
|
||||
}
|
||||
@ -63,7 +63,7 @@ class DatabaseGenMigrationCommandTest extends TestCase
|
||||
$command = new GenMigrateCommand(
|
||||
$creator = Mockery::mock(MigrationCreator::class)
|
||||
);
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', __DIR__ . DIRECTORY_SEPARATOR . 'migrations', 'users', true)->andReturn('');
|
||||
$creator->shouldReceive('create')->once()->with('create_foo', BASE_PATH . DIRECTORY_SEPARATOR . 'migrations', 'users', true)->andReturn('');
|
||||
|
||||
$this->runCommand($command, ['name' => 'create_foo', '--create' => 'users']);
|
||||
}
|
||||
@ -73,7 +73,7 @@ class DatabaseGenMigrationCommandTest extends TestCase
|
||||
$command = new GenMigrateCommand(
|
||||
$creator = Mockery::mock(MigrationCreator::class)
|
||||
);
|
||||
$creator->shouldReceive('create')->once()->with('create_users_table', __DIR__ . DIRECTORY_SEPARATOR . 'migrations', 'users', true)->andReturn('');
|
||||
$creator->shouldReceive('create')->once()->with('create_users_table', BASE_PATH . DIRECTORY_SEPARATOR . 'migrations', 'users', true)->andReturn('');
|
||||
|
||||
$this->runCommand($command, ['name' => 'create_users_table']);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user