function CssCollectionRendererUnitTest::testRenderInvalidType in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php \Drupal\Tests\Core\Asset\CssCollectionRendererUnitTest::testRenderInvalidType()
Tests a CSS asset group with the invalid 'type' => 'internal'.
File
- core/
tests/ Drupal/ Tests/ Core/ Asset/ CssCollectionRendererUnitTest.php, line 481 - Contains \Drupal\Tests\Core\Asset\CssCollectionRendererUnitTest.
Class
- CssCollectionRendererUnitTest
- Tests the CSS asset collection renderer.
Namespace
Drupal\Tests\Core\AssetCode
function testRenderInvalidType() {
$this->state
->expects($this
->once())
->method('get')
->with('system.css_js_query_string')
->will($this
->returnValue(NULL));
$this
->setExpectedException('Exception', 'Invalid CSS asset type.');
$css_group = array(
'group' => 0,
'type' => 'internal',
'media' => 'all',
'preprocess' => TRUE,
'browsers' => array(),
'data' => 'http://example.com/popular.js',
);
$this->renderer
->render($css_group);
}