assertSameSize() public static method

Assert that the size of two arrays (or Countable or Traversable objects) is the same.
public static assertSameSize ( array | Countable | Traversable $expected, array | Countable | Traversable $actual, string $message = '' )
$expected array | Countable | Traversable
$actual array | Countable | Traversable
$message string
Esempio n. 1
14
/**
 * Assert that the size of two arrays (or `Countable` or `Iterator` objects)
 * is the same.
 *
 * @param integer $expected
 * @param mixed   $actual
 * @param string  $message
 */
function assertSameSize($expected, $actual, $message = '')
{
    return PHPUnit_Framework_Assert::assertSameSize($expected, $actual, $message);
}
Esempio n. 2
0
 /**
  * Assert that the size of two arrays (or `Countable` or `Traversable` objects) is the same.
  *
  * @param array|Countable|Traversable $expected
  * @param string $message
  *
  * @return Expect
  */
 public function toHaveSameSizeAs($expected, $message = '')
 {
     Assert::assertSameSize($expected, $this->value, $message);
     return $this;
 }