PHPUnit_Framework_TestCase::assertCount PHP Method

assertCount() public method

public assertCount ( $cnt, $a )
    public function assertCount($cnt, $a)
    {
        if (count($a) != $cnt) {
            throw new Exception('count');
        }
    }

Usage Example

Exemplo n.º 1
0
 public static function check(\PHPUnit_Framework_TestCase $test, SSODescriptor $descriptor, array $expectedNameIdFormats)
 {
     $test->assertCount(count($expectedNameIdFormats), $descriptor->getAllNameIDFormats());
     foreach ($expectedNameIdFormats as $nameIdFormat) {
         $test->assertTrue($descriptor->hasNameIDFormat($nameIdFormat));
     }
 }
All Usage Examples Of PHPUnit_Framework_TestCase::assertCount