| @@ 3531-3542 (lines=12) @@ | ||
| 3528 | /** |
|
| 3529 | * @covers PHPUnit_Framework_Assert::assertCount |
|
| 3530 | */ |
|
| 3531 | public function testAssertCount() |
|
| 3532 | { |
|
| 3533 | $this->assertCount(2, array(1, 2)); |
|
| 3534 | ||
| 3535 | try { |
|
| 3536 | $this->assertCount(2, array(1, 2, 3)); |
|
| 3537 | } catch (PHPUnit_Framework_AssertionFailedError $e) { |
|
| 3538 | return; |
|
| 3539 | } |
|
| 3540 | ||
| 3541 | $this->fail(); |
|
| 3542 | } |
|
| 3543 | ||
| 3544 | /** |
|
| 3545 | * @covers PHPUnit_Framework_Assert::assertCount |
|
| @@ 3547-3558 (lines=12) @@ | ||
| 3544 | /** |
|
| 3545 | * @covers PHPUnit_Framework_Assert::assertCount |
|
| 3546 | */ |
|
| 3547 | public function testAssertCountTraversable() |
|
| 3548 | { |
|
| 3549 | $this->assertCount(2, new ArrayIterator(array(1, 2))); |
|
| 3550 | ||
| 3551 | try { |
|
| 3552 | $this->assertCount(2, new ArrayIterator(array(1, 2, 3))); |
|
| 3553 | } catch (PHPUnit_Framework_AssertionFailedError $e) { |
|
| 3554 | return; |
|
| 3555 | } |
|
| 3556 | ||
| 3557 | $this->fail(); |
|
| 3558 | } |
|
| 3559 | ||
| 3560 | /** |
|
| 3561 | * @covers PHPUnit_Framework_Assert::assertCount |
|