You are here

public function SaveUploadTest::testNoUpload in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/file/tests/src/Functional/SaveUploadTest.php \Drupal\Tests\file\Functional\SaveUploadTest::testNoUpload()

Tests for no failures when not uploading a file.

File

core/modules/file/tests/src/Functional/SaveUploadTest.php, line 636

Class

SaveUploadTest
Tests the file_save_upload() function.

Namespace

Drupal\Tests\file\Functional

Code

public function testNoUpload() {
  $this
    ->drupalGet('file-test/upload');
  $this
    ->submitForm([], 'Submit');
  $this
    ->assertSession()
    ->pageTextNotContains("Epic upload FAIL!");
}