public function testMatchesPath() { $cookie = new SetCookie(); $this->assertTrue($cookie->matchesPath('/foo')); $cookie->setPath('/foo'); $this->assertTrue($cookie->matchesPath('/foo')); $this->assertTrue($cookie->matchesPath('/foo/bar')); $this->assertFalse($cookie->matchesPath('/bar')); }
/** * @dataProvider pathMatchProvider */ public function testMatchesPath($cookiePath, $requestPath, $isMatch) { $cookie = new SetCookie(); $cookie->setPath($cookiePath); $this->assertEquals($isMatch, $cookie->matchesPath($requestPath)); }