@@ 112-121 (lines=10) @@ | ||
109 | $this->assertSame(0, $map->count()); |
|
110 | } |
|
111 | ||
112 | public function testPutAndGet() |
|
113 | { |
|
114 | $map = $this->buildMap(); |
|
115 | ||
116 | $key = new stdClass(); |
|
117 | $value = new stdClass(); |
|
118 | ||
119 | $map->put($key, $value); |
|
120 | $this->assertSame($value, $map->get($key)); |
|
121 | } |
|
122 | ||
123 | /** |
|
124 | * @expectedException \Pinepain\ObjectMaps\Exceptions\UnexpectedValueException |
|
@@ 149-158 (lines=10) @@ | ||
146 | * @expectedException \Pinepain\ObjectMaps\Exceptions\OverflowException |
|
147 | * @expectedExceptionMessage Value with such key already exists |
|
148 | */ |
|
149 | public function testPutExistentKeyFails() |
|
150 | { |
|
151 | $map = $this->buildMap(); |
|
152 | ||
153 | $key = new stdClass(); |
|
154 | $value = new stdClass(); |
|
155 | ||
156 | $map->put($key, $value); |
|
157 | $map->put($key, $value); |
|
158 | } |
|
159 | ||
160 | /** |
|
161 | * @expectedException \Pinepain\ObjectMaps\Exceptions\UnexpectedValueException |