public function hashmapTwoElements()
 {
     $h = new Hashmap();
     $h->put('color', 'green');
     $h->put('size', 'L');
     $this->fixture->writeHash('section', 'key', $h);
     $this->assertSavedFixtureEquals('
   [section]
   key[color]="green"
   key[size]="L"
 ');
 }
Beispiel #2
0
 public function containsKey_should_return_true_even_for_null_values()
 {
     $map = new Hashmap();
     $map->put("myKey", null);
     $this->assertTrue($map->containsKey("myKey"));
 }
 public function representationOfMixedHashmap()
 {
     $h = new Hashmap();
     $h->put('key', 'value');
     $h->put('number', 6100);
     $this->assertEquals('a:2:{s:3:"key";s:5:"value";s:6:"number";i:6100;}', $this->serialize($h));
 }