| @@ 27-36 (lines=10) @@ | ||
| 24 | ||
| 25 | class BucketTest extends TestCase |
|
| 26 | { |
|
| 27 | public function test() |
|
| 28 | { |
|
| 29 | $key = new stdClass(); |
|
| 30 | $value = new stdClass(); |
|
| 31 | ||
| 32 | $bucket = new Bucket($key, $value); |
|
| 33 | ||
| 34 | $this->assertSame($key, $bucket->key); |
|
| 35 | $this->assertSame($value, $bucket->value); |
|
| 36 | } |
|
| 37 | } |
|
| 38 | ||
| @@ 20-29 (lines=10) @@ | ||
| 17 | $map->put('foo', 'bar'); |
|
| 18 | } |
|
| 19 | ||
| 20 | public function testPutAndGet() |
|
| 21 | { |
|
| 22 | $map = new ObjectMap(); |
|
| 23 | ||
| 24 | $key = new stdClass(); |
|
| 25 | $value = new stdClass(); |
|
| 26 | ||
| 27 | $map->put($key, $value); |
|
| 28 | $this->assertSame($value, $map->get($key)); |
|
| 29 | } |
|
| 30 | } |
|
| 31 | ||