Esempio n. 1
0
 /**
  * @depends testOffsetSetOffsetGet
  */
 function testHashNull()
 {
     $map = new HashMap();
     $map->set(null, 1);
     $this->assertEquals(1, $map->get(null));
 }
Esempio n. 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'));
 }
Esempio n. 3
0
 /**
  * {@inheritdoc}
  */
 public function set($key, $value)
 {
     $this->validateKey($key);
     $this->store->set($key, $this->serializer->serialize($value));
 }