public function testMatchesDomainMatchesSubdomains() { $cookie = new Cookie(); $cookie->setAttribute('domain', '.nytimes.com'); $this->assertTrue($cookie->matchesDomain('nytimes.com')); $this->assertTrue($cookie->matchesDomain('blogs.nytimes.com')); $this->assertFalse($cookie->matchesDomain('google.com')); }