You are here

public function LocalPathProcessorTest::testProcessInboundHandlesImageStyles in Flysystem 3.0.x

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

@covers ::processInbound

File

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

Class

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

Namespace

Drupal\Tests\flysystem\Unit\PathProcessor

Code

public function testProcessInboundHandlesImageStyles() {
  $request = new Request();
  $this
    ->assertSame('/sites/default/files/flysystem/styles/testscheme/small', $this->processor
    ->processInbound('/sites/default/files/flysystem/styles/testscheme/small/image.jpg', $request));
  $this
    ->assertSame($request->query
    ->get('file'), 'image.jpg');
  $this
    ->assertSame('/sites/default/files/flysystem/styles/testscheme/small', $this->processor
    ->processInbound('/sites/default/files/flysystem/styles/testscheme/small/dir/image.jpg', $request));
  $this
    ->assertSame($request->query
    ->get('file'), 'dir/image.jpg');
}