You are here

public function LocalPathProcessorTest::testProcessInboundHandlesSystemDownload in Flysystem 3.x

Same name and namespace in other branches
  1. 8 tests/src/Unit/PathProcessor/LocalPathProcessorTest.php \Drupal\Tests\flysystem\Unit\PathProcessor\LocalPathProcessorTest::testProcessInboundHandlesSystemDownload()
  2. 2.0.x tests/src/Unit/PathProcessor/LocalPathProcessorTest.php \Drupal\Tests\flysystem\Unit\PathProcessor\LocalPathProcessorTest::testProcessInboundHandlesSystemDownload()
  3. 3.0.x tests/src/Unit/PathProcessor/LocalPathProcessorTest.php \Drupal\Tests\flysystem\Unit\PathProcessor\LocalPathProcessorTest::testProcessInboundHandlesSystemDownload()

@covers ::processInbound

File

tests/src/Unit/PathProcessor/LocalPathProcessorTest.php, line 61

Class

LocalPathProcessorTest
@coversDefaultClass \Drupal\flysystem\PathProcessor\LocalPathProcessor @group flysystem

Namespace

Drupal\Tests\flysystem\Unit\PathProcessor

Code

public function testProcessInboundHandlesSystemDownload() {
  $request = new Request();
  $this
    ->assertSame('/sites/default/files/flysystem', $this->processor
    ->processInbound('/sites/default/files/flysystem/file.txt', $request));
  $this
    ->assertSame('file.txt', $request->query
    ->get('file'));
  $this
    ->assertSame('/sites/default/files/flysystem', $this->processor
    ->processInbound('/sites/default/files/flysystem/a/b/c/file.txt', $request));
  $this
    ->assertSame('a/b/c/file.txt', $request->query
    ->get('file'));
}