Skip to content

Commit

Permalink
Merge pull request #5 from chadicus/dev/abstractAssertCount
Browse files Browse the repository at this point in the history
Add abstract assertCount
  • Loading branch information
chadicus committed Dec 5, 2016
2 parents 7c452c1 + 23b1e7f commit 366d8c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/ArrayAssertsTrait.php
Expand Up @@ -67,4 +67,17 @@ public function assertSameArray(array $expected, $actual, $prefix = null)
);
}
}

/**
* Asserts the number of elements of an array, Countable or Traversable.
*
* Ensures this method must be provided by classes using this trait.
*
* @param integer $expectedCount The expected number of items in $haystack.
* @param mixed $haystack The array, countable or traversable object containing items.
* @param string $message Optional error message to give upon failure.
*
* @return void
*/
abstract public function assertCount($expectedCount, $haystack, $message = '');
}

0 comments on commit 366d8c6

Please sign in to comment.