Skip to content

Commit ed2eb77

Browse files
author
Alexander Menk
committed
Added shortcut to get a PHPUnit_Framework_Constraint_Count instance
1 parent 40e860a commit ed2eb77

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

PHPUnit/Framework/Assert.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2733,6 +2733,16 @@ public static function stringEndsWith($suffix)
27332733
return new PHPUnit_Framework_Constraint_StringEndsWith($suffix);
27342734
}
27352735

2736+
/**
2737+
* Returns a PHPUnit_Framework_Constraint_Count matcher object.
2738+
*
2739+
* @param int $count
2740+
* @return PHPUnit_Framework_Constraint_Count
2741+
*/
2742+
public static function arrayCount($count)
2743+
{
2744+
return new PHPUnit_Framework_Constraint_Count($count);
2745+
}
27362746
/**
27372747
* Fails a test with the given message.
27382748
*

0 commit comments

Comments
 (0)