mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 15:41:24 +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 self-update
|
||||||
- composer install --prefer-source --no-interaction
|
- 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"
|
convertNoticesToExceptions="true"
|
||||||
convertWarningsToExceptions="true"
|
convertWarningsToExceptions="true"
|
||||||
processIsolation="false"
|
processIsolation="false"
|
||||||
stopOnFailure="false"
|
stopOnFailure="false">
|
||||||
syntaxCheck="false">
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Package Test Suite">
|
<testsuite name="Test Suite">
|
||||||
<directory suffix=".php">./tests/</directory>
|
<directory suffix=".php">./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
<filter>
|
||||||
|
<whitelist>
|
||||||
|
<directory suffix=".php">./src</directory>
|
||||||
|
</whitelist>
|
||||||
|
</filter>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
@@ -18,10 +18,10 @@ class ShoppingcartServiceProvider extends ServiceProvider
|
|||||||
{
|
{
|
||||||
$this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
|
$this->app->bind('cart', 'Gloudemans\Shoppingcart\Cart');
|
||||||
|
|
||||||
$config = __DIR__ . '/../config/cart.php';
|
$config = __DIR__ . '/Config/cart.php';
|
||||||
$this->mergeConfigFrom($config, 'cart');
|
$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 () {
|
$this->app['events']->listen(Logout::class, function () {
|
||||||
if ($this->app['config']->get('cart.destroy_on_logout')) {
|
if ($this->app['config']->get('cart.destroy_on_logout')) {
|
||||||
@@ -30,7 +30,7 @@ class ShoppingcartServiceProvider extends ServiceProvider
|
|||||||
});
|
});
|
||||||
|
|
||||||
$this->publishes([
|
$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();
|
parent::setUp();
|
||||||
|
|
||||||
$this->app->afterResolving('migrator', function ($migrator) {
|
$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