mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Style CI fixes and remove assertDatabaseCount
This commit is contained in:
@@ -98,7 +98,7 @@ class Cart
|
|||||||
$instance = $instance->getInstanceIdentifier();
|
$instance = $instance->getInstanceIdentifier();
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->instance = 'cart.' . $instance;
|
$this->instance = 'cart.'.$instance;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,7 +65,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__ . '/../src/Database/migrations'));
|
$migrator->path(realpath(__DIR__.'/../src/Database/migrations'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1477,8 +1477,6 @@ class CartTest extends TestCase
|
|||||||
$newInstance->store($newIdentifier = 456);
|
$newInstance->store($newIdentifier = 456);
|
||||||
$newInstanceSerialized = serialize($newInstance->content());
|
$newInstanceSerialized = serialize($newInstance->content());
|
||||||
|
|
||||||
$this->assertDatabaseCount('shoppingcart', 2);
|
|
||||||
|
|
||||||
$this->assertDatabaseHas('shoppingcart', ['identifier' => $identifier, 'instance' => 'default', 'content' => $serialized]);
|
$this->assertDatabaseHas('shoppingcart', ['identifier' => $identifier, 'instance' => 'default', 'content' => $serialized]);
|
||||||
|
|
||||||
$this->assertDatabaseHas('shoppingcart', ['identifier' => $newIdentifier, 'instance' => $instanceName, 'content' => $newInstanceSerialized]);
|
$this->assertDatabaseHas('shoppingcart', ['identifier' => $newIdentifier, 'instance' => $instanceName, 'content' => $newInstanceSerialized]);
|
||||||
|
|||||||
Reference in New Issue
Block a user