You are here

public function FileHelperTest::testUpdateSizeWhenTheFilePathCouldNotBeResolved in SVG Upload Sanitizer 8

File

tests/src/Unit/Helper/FileHelperTest.php, line 56

Class

FileHelperTest
Unit test class for the FileHelper class.

Namespace

Drupal\Tests\svg_upload_sanitizer\Unit\Helper

Code

public function testUpdateSizeWhenTheFilePathCouldNotBeResolved() {
  list($file) = $this
    ->prepareUpdateSize(FALSE);
  $this
    ->assertFalse($this->fileHelper
    ->updateSize($file));
  $logs = $this->logger
    ->getLogs('error');
  $this
    ->assertCount(1, $logs);
  $this
    ->assertSame('Could not resolve the path of the file (URI: "public://fileuri").', reset($logs));
}