You are here

public function InstallFunctionsTest::testFlysystemRequirementsHandlesRuntime in Flysystem 2.0.x

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

Tests flysystem_requirements() handles runtime.

File

tests/src/Unit/InstallFunctionsTest.php, line 70

Class

InstallFunctionsTest
Tests flysystem.install functions.

Namespace

Drupal\Tests\flysystem\Unit

Code

public function testFlysystemRequirementsHandlesRuntime() {
  $dependencies_exist = (int) class_exists(FlysystemStreamWrapper::class);
  $this->factory
    ->ensure()
    ->willReturn([
    'testscheme' => [
      [
        'message' => 'Test message',
        'context' => [],
        'severity' => RfcLogLevel::ERROR,
      ],
    ],
  ]);
  $return = flysystem_requirements('runtime');
  $this
    ->assertSame(2 - $dependencies_exist, count($return));
  $this
    ->assertSame('Test message', (string) $return['flysystem:testscheme']['description']);
}