customers_canvas-8.x-1.0-rc4/tests/src/Functional/SettingsTest.php
tests/src/Functional/SettingsTest.php
<?php
namespace Drupal\Tests\customers_canvas\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Settings Test confirms the settings page is functioning properly.
*
* @group customers_canvas
*/
class SettingsTest extends BrowserTestBase {
/**
* {@inheritdoc}
*/
public static $modules = ['customers_canvas'];
/**
* Test callback.
*/
public function testSettingsPage() {
$admin_user = $this->drupalCreateUser(['access customers canvas settings']);
$this->drupalLogin($admin_user);
$this->drupalGet('admin/config/services/customers_canvas');
$this->assertSession()->elementExists('xpath', '//h1[text() = "Customers Canvas Settings"]');
$this->getSession()->getPage()->pressButton('Save configuration');
}
}
