示例#1
0
 /**
  * Make sure that keys are trimmed when we forget the value.
  */
 public function testTrimKeyWhenForgeting()
 {
     $this->memories->set('       A couple of spaces    ', 123);
     $this->assertEquals(123, $this->memories->get(' A couple of spaces '));
     $this->memories->forget('       A couple of spaces           ');
     $this->assertNull($this->memories->get('A couple of spaces'));
 }
 /**
  * Test forget.
  */
 public function testForget()
 {
     $this->memories->set('Known key', 13);
     $this->assertEquals(13, $this->memories->get('Known key'));
     $this->memories->forget('Known key');
     $this->assertNull($this->memories->get('Known key'));
 }