public static function PHPUnit_Framework_Assert::assertFileExists

Asserts that a file exists.

@since Method available since Release 3.0.0

Parameters

string $filename:

string $message:

16 calls to PHPUnit_Framework_Assert::assertFileExists()
Framework_AssertTest::testAssertFileExists in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertFileExists
Framework_AssertTest::testAssertFileExistsThrowsException in drupal/core/vendor/phpunit/phpunit/Tests/Framework/AssertTest.php
@covers PHPUnit_Framework_Assert::assertFileExists @expectedException PHPUnit_Framework_Exception
PHPUnit_Framework_Assert::assertFileEquals in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts that the contents of one file is equal to the contents of another file.
PHPUnit_Framework_Assert::assertFileNotEquals in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts that the contents of one file is not equal to the contents of another file.
PHPUnit_Framework_Assert::assertJsonFileEqualsJsonFile in drupal/core/vendor/phpunit/phpunit/PHPUnit/Framework/Assert.php
Asserts that two JSON files are equal.

... See full list

File

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

Class

PHPUnit_Framework_Assert
A set of assert methods.

Code

public static function assertFileExists($filename, $message = '') {
  if (!is_string($filename)) {
    throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string');
  }
  $constraint = new PHPUnit_Framework_Constraint_FileExists();
  self::assertThat($filename, $constraint, $message);
}