You are here

public function FileHelperTest::testUpdateSizeWhenTheFileSizeCouldNotBeGotten in SVG Upload Sanitizer 8

File

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

Class

FileHelperTest
Unit test class for the FileHelper class.

Namespace

Drupal\Tests\svg_upload_sanitizer\Unit\Helper

Code

public function testUpdateSizeWhenTheFileSizeCouldNotBeGotten() {
  list($file) = $this
    ->prepareUpdateSize(TRUE, FALSE);
  $this
    ->assertFalse($this->fileHelper
    ->updateSize($file));
  $logs = $this->logger
    ->getLogs('error');
  $this
    ->assertCount(1, $logs);
  $this
    ->assertSame('Could not get the file size (path: "something/that/will/never/exists.casper").', reset($logs));
}