'inline_template', '#template' => "{{ include('sdc_theme_test:lib-overrides') }}", ]; \Drupal::state()->set('sdc_test_component', $build); $output = $this->drupalGet('sdc-test-component'); $this->assertStringContainsString('another-stylesheet.css', $output); // Since libraryOverrides is taking control of CSS, and it's not listing // lib-overrides.css, then it should not be there. Even if it's the CSS // that usually gets auto-attached. $this->assertStringNotContainsString('lib-overrides.css', $output); // Ensure that libraryDependencies adds the expected assets. $this->assertStringContainsString('dialog.position.js', $output); // Ensure that libraryOverrides processes attributes properly. $this->assertMatchesRegularExpression('@@', $output); // Ensure that libraryOverrides processes external CSS properly. $this->assertMatchesRegularExpression('@@', $output); // Ensure that libraryOverrides processes external JS properly. $this->assertMatchesRegularExpression('@@', $output); } }