| Conditions | 1 |
| Paths | 1 |
| Total Lines | 26 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | public function it_merges_config_and_publishes_file() |
||
| 15 | { |
||
| 16 | $app = Mockery::mock(Container::class, ArrayAccess::class); |
||
| 17 | Container::setInstance($app); |
||
|
|
|||
| 18 | |||
| 19 | $provider = Mockery::mock(ServiceProvider::class)->makePartial() |
||
| 20 | ->shouldAllowMockingProtectedMethods(); |
||
| 21 | $provider->__construct($app); |
||
| 22 | |||
| 23 | $baseDir = '/some/sample/directory'; |
||
| 24 | |||
| 25 | $app->shouldReceive('configPath')->atLeast()->once() |
||
| 26 | ->with('quick_migrations.php')->andReturn($baseDir.'/quick_migrations.php'); |
||
| 27 | |||
| 28 | $configFile = realpath(__DIR__ . '/../../publish/config/quick_migrations.php'); |
||
| 29 | $provider->shouldReceive('mergeConfigFrom')->once()->with( |
||
| 30 | $configFile, |
||
| 31 | 'quick_migrations' |
||
| 32 | ); |
||
| 33 | |||
| 34 | $provider->shouldReceive('publishes')->once()->with( |
||
| 35 | [$configFile => config_path('quick_migrations.php')] |
||
| 36 | ); |
||
| 37 | |||
| 38 | $provider->register(); |
||
| 39 | $this->assertTrue(true); |
||
| 40 | } |
||
| 42 |