| @@ 156-167 (lines=12) @@ | ||
| 153 | /** |
|
| 154 | * @covers PHPUnit_Framework_Assert::assertArrayHasKey |
|
| 155 | */ |
|
| 156 | public function testAssertArrayHasIntegerKey() |
|
| 157 | { |
|
| 158 | $this->assertArrayHasKey(0, array('foo')); |
|
| 159 | ||
| 160 | try { |
|
| 161 | $this->assertArrayHasKey(1, array('foo')); |
|
| 162 | } catch (PHPUnit_Framework_AssertionFailedError $e) { |
|
| 163 | return; |
|
| 164 | } |
|
| 165 | ||
| 166 | $this->fail(); |
|
| 167 | } |
|
| 168 | ||
| 169 | /** |
|
| 170 | * @covers PHPUnit_Framework_Assert::assertArraySubset |
|
| @@ 324-335 (lines=12) @@ | ||
| 321 | /** |
|
| 322 | * @covers PHPUnit_Framework_Assert::assertArrayHasKey |
|
| 323 | */ |
|
| 324 | public function testAssertArrayHasStringKey() |
|
| 325 | { |
|
| 326 | $this->assertArrayHasKey('foo', array('foo' => 'bar')); |
|
| 327 | ||
| 328 | try { |
|
| 329 | $this->assertArrayHasKey('bar', array('foo' => 'bar')); |
|
| 330 | } catch (PHPUnit_Framework_AssertionFailedError $e) { |
|
| 331 | return; |
|
| 332 | } |
|
| 333 | ||
| 334 | $this->fail(); |
|
| 335 | } |
|
| 336 | ||
| 337 | /** |
|
| 338 | * @covers PHPUnit_Framework_Assert::assertArrayNotHasKey |
|