You are here

public function FlysystemPathProcessorTest::testImageStylesAreProccessed in Flysystem 8

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

@covers ::processInbound

File

tests/src/Unit/PathProcessor/FlysystemPathProcessorTest.php, line 27

Class

FlysystemPathProcessorTest
@coversDefaultClass \Drupal\flysystem\PathProcessor\FlysystemPathProcessor @group flysystem

Namespace

Drupal\Tests\flysystem\Unit\PathProcessor

Code

public function testImageStylesAreProccessed() {
  $request = new Request();
  $processor = new FlysystemPathProcessor();
  $this
    ->assertSame('/_flysystem/styles/scheme/small', $processor
    ->processInbound('/_flysystem/scheme/styles/scheme/small/image.jpg', $request));
  $this
    ->assertSame($request->query
    ->get('file'), 'image.jpg');
  $this
    ->assertSame('/_flysystem/styles/scheme/small', $processor
    ->processInbound('/_flysystem/scheme/styles/scheme/small/dir/image.jpg', $request));
  $this
    ->assertSame($request->query
    ->get('file'), 'dir/image.jpg');
}