예제 #1
0
 /**
  * @depends testOffsetSetOffsetGet
  */
 function testHashNull()
 {
     $map = new HashMap();
     $map->set(null, 1);
     $this->assertEquals(1, $map->get(null));
 }
예제 #2
0
 /**
  * @covers  HashMap::set
  * @covers  HashMap::get
  * @depends testIsInitiallyEmpty
  */
 public function testSettingDataWorks(HashMap $store)
 {
     $store->set('foo', 'bar');
     $this->assertEquals('bar', $store->get('foo'));
 }
예제 #3
0
 /**
  * {@inheritdoc}
  */
 public function set($key, $value)
 {
     $this->validateKey($key);
     $this->store->set($key, $this->serializer->serialize($value));
 }