diff --git a/.travis.yml b/.travis.yml index 2eacae4..c22deb7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,19 @@ before_script: - composer self-update - composer install --prefer-source --no-interaction -script: vendor/bin/phpunit \ No newline at end of file +script: +- vendor/bin/phpunit --coverage-clover=coverage.xml + +after_success: +# Submit coverage report to https://codecov.io +- bash <(curl -s https://codecov.io/bash) + +# Monitor only these branches +branches: + only: + - master + +# You can delete the cache using travis-ci web interface +cache: + directories: + - $HOME/.composer/cache \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index f994f39..7c286ab 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -7,11 +7,15 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" - stopOnFailure="false" - syntaxCheck="false"> + stopOnFailure="false"> - + ./tests/ + + + ./src + + \ No newline at end of file diff --git a/config/cart.php b/src/Config/cart.php similarity index 100% rename from config/cart.php rename to src/Config/cart.php diff --git a/database/migrations/2018_12_23_120000_create_shoppingcart_table.php b/src/Database/migrations/2018_12_23_120000_create_shoppingcart_table.php similarity index 100% rename from database/migrations/2018_12_23_120000_create_shoppingcart_table.php rename to src/Database/migrations/2018_12_23_120000_create_shoppingcart_table.php diff --git a/src/ShoppingcartServiceProvider.php b/src/ShoppingcartServiceProvider.php index 691df87..c7a4b39 100644 --- a/src/ShoppingcartServiceProvider.php +++ b/src/ShoppingcartServiceProvider.php @@ -18,10 +18,10 @@ class ShoppingcartServiceProvider extends ServiceProvider { $this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart'); - $config = __DIR__ . '/../config/cart.php'; + $config = __DIR__ . '/Config/cart.php'; $this->mergeConfigFrom($config, 'cart'); - $this->publishes([__DIR__ . '/../config/cart.php' => config_path('cart.php')], 'config'); + $this->publishes([__DIR__ . '/Config/cart.php' => config_path('cart.php')], 'config'); $this->app['events']->listen(Logout::class, function () { if ($this->app['config']->get('cart.destroy_on_logout')) { @@ -30,7 +30,7 @@ class ShoppingcartServiceProvider extends ServiceProvider }); $this->publishes([ - realpath(__DIR__.'/../database/migrations') => $this->app->databasePath().'/migrations' + realpath(__DIR__.'/Database/migrations') => $this->app->databasePath().'/migrations' ]); } } diff --git a/tests/CartTest.php b/tests/CartTest.php index fbb93f2..52d6127 100644 --- a/tests/CartTest.php +++ b/tests/CartTest.php @@ -61,7 +61,7 @@ class CartTest extends TestCase parent::setUp(); $this->app->afterResolving('migrator', function ($migrator) { - $migrator->path(realpath(__DIR__.'/../database/migrations')); + $migrator->path(realpath(__DIR__.'/../src/Database/migrations')); }); }