getMaximumAge() public method

This information is rendered as the Max-Age attribute (RFC 6265, 4.1.2.2). Note that not all browsers support this attribute.
public getMaximumAge ( ) : integer
return integer The maximum age in seconds, or NULL if none has been defined.
 /**
  * @test
  */
 public function getMaximumAgeReturnsTheMaximumAge()
 {
     $cookie = new Cookie('foo', 'bar');
     $this->assertSame(null, $cookie->getMaximumAge());
     $cookie = new Cookie('foo', 'bar', 0, 120);
     $this->assertSame(120, $cookie->getMaximumAge());
 }