You are here

public function ConvertTest::test in Flysystem 2.0.x

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

@covers ::rfcToHookRequirements

File

tests/src/Unit/Logger/ConvertTest.php, line 36

Class

ConvertTest
@coversDefaultClass \Drupal\flysystem\Logger\Convert @group flysystem

Namespace

Drupal\Tests\flysystem\Unit\Logger

Code

public function test() {
  $this
    ->assertSame(REQUIREMENT_ERROR, Convert::rfcToHookRequirements(RfcLogLevel::EMERGENCY));
  $this
    ->assertSame(REQUIREMENT_ERROR, Convert::rfcToHookRequirements(RfcLogLevel::ERROR));
  $this
    ->assertSame(REQUIREMENT_WARNING, Convert::rfcToHookRequirements(RfcLogLevel::WARNING));
  $this
    ->assertSame(REQUIREMENT_INFO, Convert::rfcToHookRequirements(RfcLogLevel::NOTICE));
  $this
    ->assertSame(REQUIREMENT_INFO, Convert::rfcToHookRequirements(RfcLogLevel::INFO));
  $this
    ->assertSame(REQUIREMENT_OK, Convert::rfcToHookRequirements(RfcLogLevel::DEBUG));
}