diff --git a/composer.json b/composer.json index d8b31e1..b724a9d 100644 --- a/composer.json +++ b/composer.json @@ -16,11 +16,14 @@ "require-dev": { "codedungeon/phpunit-result-printer": "^0.4.4", "fzaninotto/faker": "~1.4", - "laravel/laravel": "5.5.*", "mockery/mockery": "0.9.*", - "phpmd/phpmd": "^2.6", - "phpunit/phpunit": "5.7.*", + "orchestra/database": "^3.5", + "orchestra/testbench-browser-kit": "^3.5", + "orchestra/testbench-dusk": "3.5.x-dev@dev", + "orchestra/testbench": "^3.5", "php-coveralls/php-coveralls" : "*", + "phpmd/phpmd": "*", + "phpunit/phpunit": "*", "sebastian/phpcpd": "*", "symfony/thanks": "^1.0" }, diff --git a/phpunit.xml b/phpunit.xml index 2be4735..ebd5c58 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -13,6 +13,10 @@ syntaxCheck="false" > + + ./tests/Browser + + ./tests/Feature @@ -29,10 +33,10 @@ + - - + diff --git a/tests/BrowserTestCase.php b/tests/BrowserTestCase.php new file mode 100644 index 0000000..4e665e3 --- /dev/null +++ b/tests/BrowserTestCase.php @@ -0,0 +1,18 @@ +make(Kernel::class)->bootstrap(); - $app->make(Factory::class)->load(__DIR__ . '/database/factories'); - $app->afterResolving('migrator', function ($migrator) { - $migrator->path(__DIR__ . '/database/migrations'); - }); - $app->register(LaravelModelCachingService::class); + parent::setUp(); - return $app; + $this->withFactories(__DIR__ . '/database/factories'); + $this->loadMigrationsFrom(realpath(__DIR__ . '/database/migrations')); + } + + /** + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + protected function getPackageProviders($app) + { + return [ + LaravelModelCachingService::class, + ConsoleServiceProvider::class, + ]; } } diff --git a/tests/FeatureTestCase.php b/tests/FeatureTestCase.php new file mode 100644 index 0000000..c68771a --- /dev/null +++ b/tests/FeatureTestCase.php @@ -0,0 +1,8 @@ +