public function MachineNameControllerTest::testMachineNameController

Tests machine name controller's transliteration functionality.

@dataProvider providerTestMachineNameController

Parameters

array $request_params: An array of request parameters.

$expected_content: The expected content of the JSONresponse.

See also

\Drupal\system\MachineNameController::transliterate()

File

drupal/core/modules/system/tests/Drupal/system/Tests/Transliteration/MachineNameControllerTest.php, line 77
Contains \Drupal\system\Tests\Transliteration\MachineNameControllerTest.

Class

MachineNameControllerTest
Tests machine name controller's transliteration functionality.

Namespace

Drupal\system\Tests\Transliteration

Code

public function testMachineNameController(array $request_params, $expected_content) {
  $request = Request::create('', 'GET', $request_params);
  $json = $this->machineNameController
    ->transliterate($request);
  $this
    ->assertEquals($expected_content, $json
    ->getContent());
}