Restructuring

Added codecov
This commit is contained in:
Patrick Henninger
2018-12-28 17:00:55 +01:00
parent 1190d72b52
commit 423e2b7c3f
6 changed files with 27 additions and 8 deletions

View File

@@ -9,4 +9,19 @@ before_script:
- composer self-update
- composer install --prefer-source --no-interaction
script: vendor/bin/phpunit
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

View File

@@ -7,11 +7,15 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<testsuites>
<testsuite name="Package Test Suite">
<testsuite name="Test Suite">
<directory suffix=".php">./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>

View File

@@ -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'
]);
}
}

View File

@@ -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'));
});
}