mnabialek /
laravel-quick-migrations
| 1 | <?php |
||||||
| 2 | |||||||
| 3 | namespace Mnabialek\LaravelQuickMigrations\Tests\Providers; |
||||||
| 4 | |||||||
| 5 | use ArrayAccess; |
||||||
| 6 | use Illuminate\Container\Container; |
||||||
| 7 | use Mnabialek\LaravelQuickMigrations\Providers\ServiceProvider; |
||||||
| 8 | use Mnabialek\LaravelQuickMigrations\Tests\UnitTestCase; |
||||||
| 9 | use Mockery; |
||||||
| 10 | |||||||
| 11 | class ServiceProviderTest extends UnitTestCase |
||||||
| 12 | { |
||||||
| 13 | /** @test */ |
||||||
| 14 | public function it_merges_config_and_publishes_file() |
||||||
| 15 | { |
||||||
| 16 | $app = Mockery::mock(Container::class, ArrayAccess::class); |
||||||
| 17 | Container::setInstance($app); |
||||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||||
| 18 | |||||||
| 19 | $provider = Mockery::mock(ServiceProvider::class)->makePartial() |
||||||
| 20 | ->shouldAllowMockingProtectedMethods(); |
||||||
| 21 | $provider->__construct($app); |
||||||
|
0 ignored issues
–
show
The method
__construct() does not exist on Mockery\LegacyMockInterface. It seems like you code against a sub-type of Mockery\LegacyMockInterface such as Mockery\Mock.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 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(); |
||||||
|
0 ignored issues
–
show
The method
register() does not exist on Mockery\LegacyMockInterface. It seems like you code against a sub-type of Mockery\LegacyMockInterface such as Mockery\Mock.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||||
| 39 | $this->assertTrue(true); |
||||||
| 40 | } |
||||||
| 41 | } |
||||||
| 42 |