2025-10-11 18:31:07 -07:00
|
|
|
<?php
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace CakeCarts\Test\TestCase\Controller\Component;
|
|
|
|
|
|
|
|
|
|
use Cake\Controller\ComponentRegistry;
|
|
|
|
|
use Cake\TestSuite\TestCase;
|
|
|
|
|
use CakeCarts\Controller\Component\ShoppingCartComponent;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* CakeCarts\Controller\Component\ShoppingCartComponent Test Case
|
|
|
|
|
*/
|
2026-01-23 20:32:22 -08:00
|
|
|
class ShoppingCartComponentTest extends TestCase {
|
|
|
|
|
|
|
|
|
|
/**
|
2025-10-11 18:31:07 -07:00
|
|
|
* Test subject
|
|
|
|
|
*
|
|
|
|
|
* @var \CakeCarts\Controller\Component\ShoppingCartComponent
|
|
|
|
|
*/
|
2026-01-23 20:32:22 -08:00
|
|
|
protected $ShoppingCart;
|
2025-10-11 18:31:07 -07:00
|
|
|
|
2026-01-23 20:32:22 -08:00
|
|
|
/**
|
2025-10-11 18:31:07 -07:00
|
|
|
* setUp method
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2026-01-23 20:32:22 -08:00
|
|
|
protected function setUp(): void {
|
|
|
|
|
parent::setUp();
|
|
|
|
|
$registry = new ComponentRegistry();
|
|
|
|
|
$this->ShoppingCart = new ShoppingCartComponent($registry);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2025-10-11 18:31:07 -07:00
|
|
|
* tearDown method
|
|
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
2026-01-23 20:32:22 -08:00
|
|
|
protected function tearDown(): void {
|
|
|
|
|
unset($this->ShoppingCart);
|
|
|
|
|
|
|
|
|
|
parent::tearDown();
|
|
|
|
|
}
|
2025-10-11 18:31:07 -07:00
|
|
|
|
|
|
|
|
}
|