You are here

public function Framework_ConstraintTest::testConstraintStringMatches6 in Zircon Profile 8

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

@covers PHPUnit_Framework_Constraint_StringMatches @covers PHPUnit_Framework_Assert::matches @covers PHPUnit_Framework_Constraint::count

File

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

Class

Framework_ConstraintTest
@since Class available since Release 3.0.0

Code

public function testConstraintStringMatches6() {
  $constraint = PHPUnit_Framework_Assert::matches('*%f*');
  $this
    ->assertFalse($constraint
    ->evaluate('**', '', true));
  $this
    ->assertTrue($constraint
    ->evaluate('*1.0*', '', true));
  $this
    ->assertEquals('matches PCRE pattern "/^\\*[+-]?\\.?\\d+\\.?\\d*(?:[Ee][+-]?\\d+)?\\*$/s"', $constraint
    ->toString());
  $this
    ->assertEquals(1, count($constraint));
}