You are here

public function FlysystemRoutesTest::testValidRoutesReturnedWithImageModule in Flysystem 8

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

@covers ::routes

File

tests/src/Unit/Routing/FlysystemRoutesTest.php, line 132

Class

FlysystemRoutesTest
@coversDefaultClass \Drupal\flysystem\Routing\FlysystemRoutes @group flysystem

Namespace

Drupal\Tests\flysystem\Unit\Routing

Code

public function testValidRoutesReturnedWithImageModule() {
  new Settings([
    'flysystem' => [
      'test' => [
        'driver' => 'local',
        'public' => TRUE,
        'config' => [
          'public' => TRUE,
          'root' => 'sites/default/files/flysystem',
        ],
      ],
    ],
  ]);
  $this->moduleHandler
    ->moduleExists('image')
    ->willReturn(TRUE);
  $routes = $this->router
    ->routes();
  $this
    ->assertSame(3, count($routes));
  $this
    ->assertTrue(isset($routes['flysystem.image_style']));
}