DashboardEmptyTest.php in Purge 8.3
File
modules/purge_ui/tests/src/Functional/DashboardEmptyTest.php
View source
<?php
namespace Drupal\Tests\purge_ui\Functional;
class DashboardEmptyTest extends DashboardTestBase {
public static $modules = [
'purge_ui_remove_block_plugins_test',
];
public function testFormLoggingSection() : void {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet($this->route);
$this
->assertSession()
->responseContains('Logging');
$this
->assertSession()
->responseContains('Configure logging behavior');
}
public function testFormDiagnosticReport() : void {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet($this->route);
$this
->assertSession()
->responseContains('You have no queuers populating the queue!');
$this
->assertSession()
->responseContains('There is no purging capacity available.');
$this
->assertSession()
->responseContains('There is no purger loaded which means that you need a module enabled to provide a purger plugin to clear your external cache or CDN.');
$this
->assertSession()
->responseContains('You have no processors, the queue can now build up because of this.');
}
public function testMissingMessages() : void {
$this
->drupalLogin($this->adminUser);
$this
->drupalGet($this->route);
$this
->assertSession()
->responseContains('Please install a module to add at least one queuer.');
$this
->assertSession()
->responseNotContains('Add queuer');
$this
->assertSession()
->responseContains('Please install a module to add at least one purger.');
$this
->assertSession()
->responseNotContains('Add purger');
$this
->assertSession()
->responseContains('Please install a module to add at least one processor.');
$this
->assertSession()
->responseNotContains('Add processor');
}
}