coming along
This commit is contained in:
@@ -15,4 +15,31 @@ use CakeCarts\Controller\CartsController;
|
||||
class CartsControllerTest extends TestCase
|
||||
{
|
||||
use IntegrationTestTrait;
|
||||
|
||||
/**
|
||||
* Test subject
|
||||
*
|
||||
* @var \CakeCarts\Model\Table\CartItemsTable
|
||||
*/
|
||||
protected $Carts;
|
||||
|
||||
public function setUp(): void
|
||||
{
|
||||
parent::setUp(); // TODO: Change the autogenerated stub
|
||||
|
||||
$config = $this->getTableLocator()->exists('Carts') ? [] : ['className' => CartsTable::class];
|
||||
$this->Carts = $this->getTableLocator()->get('Carts', $config);
|
||||
}
|
||||
|
||||
public function testIndex(): void
|
||||
{
|
||||
$url = [
|
||||
'plugin' => 'CakeCarts',
|
||||
'controller' => 'Carts',
|
||||
'action' => 'index',
|
||||
];
|
||||
$this->get($url);
|
||||
|
||||
$this->assertResponseCode(200);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user