lithium\test\Unit::assertNotCount()

public method

Assert that the passed result array has not the expected number of elements.

$this->assertNotCount(2, ['foo', 'bar', 'bar']); // succeeds
$this->assertNotCount(1, ['foo']); // fails

Parameters

  • integer $expected
  • array $array
  • string|boolean $message

Returns

boolean

true if the assertion succeeded, false otherwise.

Source

	public function assertNotCount($expected, $array, $message = '{:message}') {
		return $this->assert($expected !== ($result = count($array)), $message, [
			'expected' => $expected,
			'result' => $result
		]);
	}