public function SanitizerHelperTest::testSanitizeWhenRealpathIsNotResolved in SVG Upload Sanitizer 8
File
- tests/
src/ Unit/ Helper/ SanitizerHelperTest.php, line 65
Class
- SanitizerHelperTest
- Unit test class for the SanitizeHelper class.
Namespace
Drupal\Tests\svg_upload_sanitizer\Unit\HelperCode
public function testSanitizeWhenRealpathIsNotResolved() {
list($file) = $this
->prepareFile(FALSE);
$this
->assertFalse($this->sanitizerHelper
->sanitize($file));
$logs = $this->logger
->getLogs('notice');
$this
->assertCount(1, $logs);
$this
->assertSame('Could not resolve the path of the file (URI: "public://fileuri").', reset($logs));
}