Skip to content

Commit caa3c95

Browse files
authored
Merge pull request #6781 from paulbalandan/deprecated-mocked-method
Remove testing of deprecated methods in CookieStore
2 parents aebe571 + bd34453 commit caa3c95

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

tests/system/Cookie/CookieStoreTest.php

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
use CodeIgniter\Cookie\Exceptions\CookieException;
1515
use CodeIgniter\Test\CIUnitTestCase;
1616
use DateTimeImmutable;
17-
use PHPUnit\Framework\MockObject\MockObject;
1817

1918
/**
2019
* @internal
@@ -96,29 +95,6 @@ public function testPutRemoveCookiesInStore(): void
9695
$this->assertFalse($jar->has('dev'));
9796
}
9897

99-
public function testCookieDispatching(): void
100-
{
101-
$cookies = [
102-
'dev' => new Cookie('dev', 'cookie'),
103-
'prod' => new Cookie('prod', 'cookie', ['raw' => true]),
104-
];
105-
106-
$dev = $cookies['dev']->getOptions();
107-
$prod = $cookies['prod']->getOptions();
108-
109-
/**
110-
* @var CookieStore&MockObject $store
111-
*/
112-
$store = $this->getMockBuilder(CookieStore::class)
113-
->setConstructorArgs([$cookies])
114-
->onlyMethods(['setRawCookie', 'setCookie'])
115-
->getMock();
116-
117-
$store->expects($this->once())->method('setRawCookie')->with('prod', 'cookie', $prod);
118-
$store->expects($this->once())->method('setCookie')->with('dev', 'cookie', $dev);
119-
$store->dispatch();
120-
}
121-
12298
public function testCookiesFunction(): void
12399
{
124100
$a = cookies();

0 commit comments

Comments
 (0)