public function testBadHashParameter($hash) { /** @var callable $controller */
$controller =
$this->container
->
get('controller_resolver'
) ->
getControllerFromDefinition('\Drupal\media\Controller\OEmbedIframeController::render'
);
$this->
assertIsCallable($controller);
$this->
expectException('\Symfony\Component\HttpKernel\Exception\BadRequestHttpException'
);
$this->
expectExceptionMessage('This resource is not available'
);
$request =
new Request([ 'url' => 'https://example.com/path/to/resource',
'hash' =>
$hash,
]);
$controller($request);
} /**
* Tests that resources can be used in media_oembed_iframe preprocess.
*
* @see media_test_oembed_preprocess_media_oembed_iframe()
*
* @covers ::render
*/