You are here

public function FlysystemFactoryTest::testGetSchemesFiltersInvalidSchemes in Flysystem 3.0.x

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

@covers ::getSchemes @covers ::__construct

File

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

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
    ->isValidScheme('invalidscheme')
    ->willReturn(FALSE);
  $this
    ->assertSame([
    'testscheme',
  ], $this
    ->getFactory()
    ->getSchemes());
}