You are here

public function LinkCheckerResponseCodesTest::testIsValid in Link checker 8

Tests the the ::isValid method.

@dataProvider isValidDataProvider

@covers ::isValid

Parameters

int $code: The HTTP response code.

bool $result: The expected result from calling the function.

File

tests/src/Unit/LinkCheckerResponseCodesTest.php, line 45

Class

LinkCheckerResponseCodesTest
Tests \Drupal\linkchecker\LinkCheckerResponseCodes.

Namespace

Drupal\Tests\linkchecker\Unit

Code

public function testIsValid(int $code, bool $result) {
  $this
    ->assertEquals($result, $this->linkCheckerResponseCodes
    ->isValid($code));
}