public function testRemovesSelectively() { $cookies = $this->getTestCookies(); foreach ($this->getTestCookies() as $cookie) { $this->jar->add($cookie); } // Remove foo.com cookies $this->jar->remove('foo.com'); $this->assertEquals(2, count($this->jar)); // Try again, removing no further cookies $this->jar->remove('foo.com'); $this->assertEquals(2, count($this->jar)); // Remove bar.com cookies with path of /boo $this->jar->remove('bar.com', '/boo'); $this->assertEquals(1, count($this->jar)); // Remove cookie by name $this->jar->remove(null, null, 'test'); $this->assertEquals(0, count($this->jar)); }