public function testRemove() { $case = new ArrayCase($this->arr); $this->assertTrue($case->has('baz')); $case->remove('baz'); $this->assertFalse($case->has('baz')); }
/** * Set the Expires HTTP header. * To remove it pass NULL as parameter * @param \DateTime|null $date A \DateTime instance | null * * @return \Modulework\Modules\Http\Response THIS */ public function setExpires(DateTime $date = null) { if ($date === null) { $this->headers->remove('Expires'); } else { $date->setTimezone(new DateTimeZone('UTC')); $this->headers->set('Expires', $date->format('D, d M Y H:i:s') . ' GMT'); } return $this; }