You are here

public function BlazyUnitTest::testWidthFromDescriptors in Blazy 8

Test \Drupal\blazy\Blazy\widthFromDescriptors.

@covers ::widthFromDescriptors @dataProvider providerTestWidthFromDescriptors

Parameters

string $data: The input data which can be string, or integer.

mixed|bool|int $expected: The expected output.

File

tests/src/Unit/BlazyUnitTest.php, line 44

Class

BlazyUnitTest
@coversDefaultClass \Drupal\blazy\Blazy

Namespace

Drupal\Tests\blazy\Unit

Code

public function testWidthFromDescriptors($data, $expected) {
  $result = Blazy::widthFromDescriptors($data);
  $this
    ->assertSame($result, $expected);
}