Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions tests/system/Cookie/CookieStoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use CodeIgniter\Cookie\Exceptions\CookieException;
use CodeIgniter\Test\CIUnitTestCase;
use DateTimeImmutable;
use PHPUnit\Framework\MockObject\MockObject;

/**
* @internal
Expand Down Expand Up @@ -96,29 +95,6 @@ public function testPutRemoveCookiesInStore(): void
$this->assertFalse($jar->has('dev'));
}

public function testCookieDispatching(): void
{
$cookies = [
'dev' => new Cookie('dev', 'cookie'),
'prod' => new Cookie('prod', 'cookie', ['raw' => true]),
];

$dev = $cookies['dev']->getOptions();
$prod = $cookies['prod']->getOptions();

/**
* @var CookieStore&MockObject $store
*/
$store = $this->getMockBuilder(CookieStore::class)
->setConstructorArgs([$cookies])
->onlyMethods(['setRawCookie', 'setCookie'])
->getMock();

$store->expects($this->once())->method('setRawCookie')->with('prod', 'cookie', $prod);
$store->expects($this->once())->method('setCookie')->with('dev', 'cookie', $dev);
$store->dispatch();
}

public function testCookiesFunction(): void
{
$a = cookies();
Expand Down