mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-11 18:54:33 +00:00
Restructuring
Added codecov
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -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
|
||||
10
phpunit.xml
10
phpunit.xml
@@ -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>
|
||||
@@ -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'
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user