public function StatisticsAttachedTest::testAttached in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/statistics/src/Tests/StatisticsAttachedTest.php \Drupal\statistics\Tests\StatisticsAttachedTest::testAttached()
Tests if statistics.js is loaded when content is not printed.
File
- core/
modules/ statistics/ src/ Tests/ StatisticsAttachedTest.php, line 49 - Contains \Drupal\statistics\Tests\StatisticsAttachedTest.
Class
- StatisticsAttachedTest
- Tests if statistics.js is loaded when content is not printed.
Namespace
Drupal\statistics\TestsCode
public function testAttached() {
$node = Node::create([
'type' => 'page',
'title' => 'Page node',
'body' => 'body text',
]);
$node
->save();
$this
->drupalGet('node/' . $node
->id());
$this
->assertRaw('core/modules/statistics/statistics.js', 'Statistics library is available');
}