You are here

public function Framework_ConstraintTest::testConstraintIsAnything in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php \Framework_ConstraintTest::testConstraintIsAnything()

@covers PHPUnit_Framework_Constraint_IsAnything @covers PHPUnit_Framework_Assert::anything @covers PHPUnit_Framework_Constraint::count @covers PHPUnit_Framework_TestFailure::exceptionToString

File

vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php, line 539

Class

Framework_ConstraintTest
@since Class available since Release 3.0.0

Code

public function testConstraintIsAnything() {
  $constraint = PHPUnit_Framework_Assert::anything();
  $this
    ->assertTrue($constraint
    ->evaluate(null, '', true));
  $this
    ->assertNull($constraint
    ->evaluate(null));
  $this
    ->assertEquals('is anything', $constraint
    ->toString());
  $this
    ->assertEquals(0, count($constraint));
}