You are here

public function FetcherResultTest::testNonReadableFile in Feeds 8.3

@covers ::getRaw

File

tests/src/Unit/Result/FetcherResultTest.php, line 54

Class

FetcherResultTest
@coversDefaultClass \Drupal\feeds\Result\FetcherResult @group feeds

Namespace

Drupal\Tests\feeds\Unit\Result

Code

public function testNonReadableFile() {
  file_put_contents('vfs://feeds/test_file', 'I am test data.');
  chmod('vfs://feeds/test_file', 00);
  $result = new FetcherResult('vfs://feeds/test_file');
  $this
    ->expectException(RuntimeException::class);
  $result
    ->getRaw();
}