You are here

public function InstallFunctionsTest::testFlysystemRequirementsHandlesRuntime in Flysystem 8

Same name and namespace in other branches
  1. 3.x tests/src/Unit/InstallFunctionsTest.php \Drupal\Tests\flysystem\Unit\InstallFunctionsTest::testFlysystemRequirementsHandlesRuntime()
  2. 2.0.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 71

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']);
}