You are here

public function ResponseTest::testMinifyHtml in Minify Source HTML 8

Test possible cases which covered by the module.

@dataProvider dataProvider

Parameters

string $case: Case which currently tested. Passed to the route parameters to reach controller with required response.

string $expected_output: Expected response result.

File

tests/src/Functional/ResponseTest.php, line 123

Class

ResponseTest
Class ResponseTest.

Namespace

Drupal\Tests\minifyhtml\Functional

Code

public function testMinifyHtml($case, $expected_output) {
  $this
    ->drupalGet(Url::fromRoute('minifyhtml_test.case', [
    'case' => $case,
  ]));
  $actual_output = $this
    ->getSession()
    ->getPage()
    ->getContent();
  $this
    ->assertEquals($expected_output, $actual_output, 'Minified source not matches expected output.');
  $this
    ->assertSame($expected_output, $actual_output, 'Minified source not matches expected output.');
}