diff -u b/tests/src/Functional/ReadOnlyConfigTest.php b/tests/src/Functional/ReadOnlyConfigTest.php --- b/tests/src/Functional/ReadOnlyConfigTest.php +++ b/tests/src/Functional/ReadOnlyConfigTest.php @@ -2,6 +2,7 @@ namespace Drupal\Tests\config_readonly\Functional; +use Behat\Mink\Element\NodeElement; use Drupal\Tests\BrowserTestBase; use Drupal\Core\Url; @@ -31,7 +32,7 @@ * * @var string */ - public $message = 'This form will not be saved because the configuration active store is read-only.'; + private $message = 'This form will not be saved because the configuration active store is read-only.'; /** * {@inheritdoc} @@ -86,7 +87,7 @@ $edit = [ 'modules[Core][action][enable]' => 'action', ]; - $this->drupalPostForm($module_url, $edit, t('Install')); + $this->drupalPostForm($module_url, $edit, 'Install'); $this->assertSession()->pageTextNotContains($this->message); // Switch forms to read-only. @@ -100,9 +101,9 @@ $this->drupalGet($module_url); $elements = $this->xpath("//form[@id='system-modules']//input[@id='edit-submit']"); -// $install_button = isset($elements[0]) && $elements[0] instanceof \SimpleXMLElement ? $elements[0]-> attributes() : FALSE; -// self::assertTrue($install_button !== FALSE, 'Found the install form submit button.'); -// self::assertTrue((string) $install_button['disabled'] == 'disabled', 'The install modules form button is disabled.'); + $install_button = isset($elements[0]) && $elements[0] instanceof NodeElement ? $elements[0] : FALSE; + $this->assertTrue($install_button !== FALSE, 'Found the install form submit button.'); + $this->assertTrue($install_button->hasAttribute('disabled'), 'The install modules form button is disabled.'); } /**