public static function PHPUnit_Framework_Assert::assertStringMatchesFormatFile

Asserts that a string matches a given format file.

@since Method available since Release 3.5.0

Parameters

string $formatFile:

string $string:

string $message:

3 calls to PHPUnit_Framework_Assert::assertStringMatchesFormatFile()
FailureTest::testAssertStringMatchesFormatFile in drupal/core/vendor/phpunit/phpunit/Tests/_files/FailureTest.php
PHP_CodeCoverage_Report_CloverTest::testCloverForBankAccountTest in drupal/core/vendor/phpunit/php-code-coverage/Tests/PHP/CodeCoverage/Report/CloverTest.php
@covers PHP_CodeCoverage_Report_Clover
PHP_CodeCoverage_Report_CloverTest::testCloverForFileWithIgnoredLines in drupal/core/vendor/phpunit/php-code-coverage/Tests/PHP/CodeCoverage/Report/CloverTest.php
@covers PHP_CodeCoverage_Report_Clover

File

drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php, line 1490

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertStringMatchesFormatFile($formatFile, $string, $message = '') {
  self::assertFileExists($formatFile, $message);
  if (!is_string($string)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string');
  }
  $constraint = new PHPUnit_Framework_Constraint_StringMatches(file_get_contents($formatFile));
  self::assertThat($string, $constraint, $message);
}