You are here

public function FlysystemFactoryTest::testGetSchemesFiltersInvalidSchemes in Flysystem 8

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

@covers ::getSchemes @covers ::__construct

File

tests/src/Unit/FlysystemFactoryTest.php, line 139

Class

FlysystemFactoryTest
@coversDefaultClass \Drupal\flysystem\FlysystemFactory @group flysystem

Namespace

Drupal\Tests\flysystem\Unit

Code

public function testGetSchemesFiltersInvalidSchemes() {
  new Settings([
    'flysystem' => [
      'testscheme' => [
        'driver' => 'testdriver',
      ],
      'invalidscheme' => [
        'driver' => 'testdriver',
      ],
    ],
  ]);
  $this->filesystem
    ->validScheme('invalidscheme')
    ->willReturn(FALSE);
  $this
    ->assertSame([
    'testscheme',
  ], $this
    ->getFactory()
    ->getSchemes());
}