diff --git a/core/modules/config/src/Tests/SchemaCheckTestTrait.php b/core/modules/config/src/Tests/SchemaCheckTestTrait.php index ede1e56..6946157 100644 --- a/core/modules/config/src/Tests/SchemaCheckTestTrait.php +++ b/core/modules/config/src/Tests/SchemaCheckTestTrait.php @@ -28,19 +28,19 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c if ($errors === FALSE) { // @todo Since the use of this trait is under TestBase, it works. // Can be fixed as part of https://www.drupal.org/node/2260053. - $this->fail(SafeMarkup::format('No schema for @config_name', array('@config_name' => $config_name))); + $this->assertTrue(FALSE, SafeMarkup::format('No schema for @config_name', array('@config_name' => $config_name))); return; } elseif ($errors === TRUE) { // @todo Since the use of this trait is under TestBase, it works. // Can be fixed as part of https://www.drupal.org/node/2260053. - $this->pass(SafeMarkup::format('Schema found for @config_name and values comply with schema.', array('@config_name' => $config_name))); + $this->assertTrue(TRUE, SafeMarkup::format('Schema found for @config_name and values comply with schema.', array('@config_name' => $config_name))); } else { foreach ($errors as $key => $error) { // @todo Since the use of this trait is under TestBase, it works. // Can be fixed as part of https://www.drupal.org/node/2260053. - $this->fail(SafeMarkup::format('Schema key @key failed with: @error', array('@key' => $key, '@error' => $error))); + $this->assertTrue(FALSE, SafeMarkup::format('Schema key @key failed with: @error', array('@key' => $key, '@error' => $error))); } } } @@ -52,7 +52,8 @@ public function assertConfigSchema(TypedConfigManagerInterface $typed_config, $c * The configuration name. */ public function assertConfigSchemaByName($config_name) { - $config = $this->config($config_name); + $config_factory = \Drupal::configFactory(); + $config = $config_factory->get($config_name); $this->assertConfigSchema(\Drupal::service('config.typed'), $config->getName(), $config->get()); } diff --git a/core/modules/system/config/schema/system.schema.yml b/core/modules/system/config/schema/system.schema.yml index e34d375..732798e 100644 --- a/core/modules/system/config/schema/system.schema.yml +++ b/core/modules/system/config/schema/system.schema.yml @@ -279,6 +279,9 @@ system.file: temporary: type: string label: 'Temporary directory' + private: + type: string + label: 'Private directory' temporary_maximum_age: type: integer label: 'Maximum age for temporary files' diff --git a/core/profiles/standard/tests/src/Functional/StandardProfileTest.php b/core/profiles/standard/tests/src/Functional/StandardProfileTest.php index 659dd9e..8f61683 100644 --- a/core/profiles/standard/tests/src/Functional/StandardProfileTest.php +++ b/core/profiles/standard/tests/src/Functional/StandardProfileTest.php @@ -10,6 +10,7 @@ use Drupal\simpletest\NodeCreationTrait; use Drupal\Tests\BrowserTestBase; use Drupal\user\Entity\Role; +use Drupal\user\Entity\User; /** * Tests Standard installation profile expectations. @@ -57,7 +58,7 @@ function testStandard() { $this->drupalLogin($this->adminUser); // Configure the block. $this->drupalGet('admin/structure/block/add/system_menu_block:main/bartik'); - $this->submitForm(NULL, array( + $this->submitForm(array( 'region' => 'sidebar_first', 'id' => 'main_navigation', ), t('Save block')); @@ -95,15 +96,18 @@ function testStandard() { $this->drupalLogin($this->adminUser); $this->drupalGet('node/1'); $page = $this->getSession()->getPage(); - $this->assertContains('Then she picked out two somebodies,
Sally and me', $page->getHtml(), 'Found a line break.'); - $this->submitForm(NULL, array( + $this->assertContains('Then she picked out two somebodies,
Sally and me', $page->getHtml(), 'Found a line break.'); + $this->submitForm(array( 'subject[0][value]' => 'Barfoo', 'comment_body[0][value]' => 'Then she picked out two somebodies, Sally and me', ), t('Save')); // Fetch the feed. $this->drupalGet('rss.xml'); - $assert_session->pageTextContains('Foobar'); - $assert_session->pageTextNotContains('Then she picked out two somebodies, Sally and me'); + // Mink session by default initialized html document so to get xml we use + // last response of the driver. + $xml = $this->getSession()->getDriver()->getContent(); + $this->assertContains('Foobar', $xml); + $this->assertNotContains('Then she picked out two somebodies, Sally and me', $xml); // Ensure block body exists. $this->drupalGet('block/add'); @@ -156,9 +160,11 @@ function testStandard() { $this->adminUser->save(); $this->drupalGet('node/add'); $assert_session->statusCodeEquals(200); + $this->drupalLogout(); // Ensure that there are no pending updates after installation. - $this->drupalLogin($this->rootUser); + $root_user = User::load(1); + $this->drupalLogin($root_user); $this->drupalGet('update.php/selection'); $assert_session->pageTextContains('No pending updates.'); diff --git a/core/tests/Drupal/Tests/BrowserTestBase.php b/core/tests/Drupal/Tests/BrowserTestBase.php index 4c66a70..acdce5d 100644 --- a/core/tests/Drupal/Tests/BrowserTestBase.php +++ b/core/tests/Drupal/Tests/BrowserTestBase.php @@ -817,7 +817,7 @@ protected function drupalLogin(AccountInterface $account) { // @see BrowserTestBase::drupalUserIsLoggedIn() $account->sessionId = $this->getSession()->getCookie($this->getSessionName()); - $this->assertTrue($this->drupalUserIsLoggedIn($account), SafeMarkup::format('User %name successfully logged in.', array('name' => $account->getUsername()))); + $this->assertTrue($this->drupalUserIsLoggedIn($account), SafeMarkup::format('User %name successfully logged in.', array('%name' => $account->getUsername()))); $this->loggedInUser = $account; $this->container->get('current_user')->setAccount($account);