/**
  * @covers Guzzle\Http\CookieJar\ArrayCookieJar
  */
 public function testClearsTemporaryCookies()
 {
     self::addCookies($this->jar);
     $this->assertEquals(1, $this->jar->clearTemporary());
     $this->hasCookies($this->jar->getCookies(), array('foo', 'baz', 'muppet', 'googoo'));
     // Doesn't clear anything out because nothing is temporary
     $this->assertEquals(0, $this->jar->clearTemporary());
     // Add an expired cookie
     $this->jar->save(array('cookie' => array('data', 'abc'), 'domain' => '.example.com'));
     // Filters out expired cookies
     $this->hasCookies($this->jar->getCookies(), array('foo', 'baz', 'muppet', 'googoo', 'data'));
     // Removes the expired cookie
     $this->assertEquals(1, $this->jar->clearTemporary());
     $this->hasCookies($this->jar->getCookies(), array('foo', 'baz', 'muppet', 'googoo'));
 }