protected function CssCollectionRendererUnitTest::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/tests/Drupal/Tests/Core/Asset/CssCollectionRendererUnitTest.php \Drupal\Tests\Core\Asset\CssCollectionRendererUnitTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Asset/ CssCollectionRendererUnitTest.php, line 33
Class
- CssCollectionRendererUnitTest
- Tests the CSS asset collection renderer.
Namespace
Drupal\Tests\Core\AssetCode
protected function setUp() {
parent::setUp();
$state = $this
->prophesize(StateInterface::class);
$state
->get('system.css_js_query_string', '0')
->shouldBeCalledOnce()
->willReturn(NULL);
$this->renderer = new CssCollectionRenderer($state
->reveal());
$this->fileCssGroup = [
'group' => -100,
'type' => 'file',
'media' => 'all',
'preprocess' => TRUE,
'browsers' => [
'IE' => TRUE,
'!IE' => TRUE,
],
'items' => [
0 => [
'group' => -100,
'type' => 'file',
'weight' => 0.012,
'media' => 'all',
'preprocess' => TRUE,
'data' => 'tests/Drupal/Tests/Core/Asset/foo.css',
'browsers' => [
'IE' => TRUE,
'!IE' => TRUE,
],
'basename' => 'foo.css',
],
1 => [
'group' => -100,
'type' => 'file',
'weight' => 0.013,
'media' => 'all',
'preprocess' => TRUE,
'data' => 'tests/Drupal/Tests/Core/Asset/bar.css',
'browsers' => [
'IE' => TRUE,
'!IE' => TRUE,
],
'basename' => 'bar.css',
],
],
];
}