Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Assert.php

function Assert::assertFileExists

Asserts that a file exists.

Throws

ExpectationFailedException

25 calls to Assert::assertFileExists()
Assert::assertFileEquals in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that the contents of one file is equal to the contents of another file.
Assert::assertFileEqualsCanonicalizing in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that the contents of one file is equal to the contents of another file (canonicalizing).
Assert::assertFileEqualsIgnoringCase in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that the contents of one file is equal to the contents of another file (ignoring case).
Assert::assertFileIsNotReadable in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that a file exists and is not readable.
Assert::assertFileIsNotWritable in vendor/phpunit/phpunit/src/Framework/Assert.php
Asserts that a file exists and is not writable.

... See full list

File

vendor/phpunit/phpunit/src/Framework/Assert.php, line 776

Class

Assert
@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

Namespace

PHPUnit\Framework

Code

public static final function assertFileExists(string $filename, string $message = '') : void {
    static::assertThat($filename, new FileExists(), $message);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal