Update to drupal-org-drupal 8.0.0-rc2. For more information, see https://www.drupal.org/node/2598668
This commit is contained in:
parent
f32e58e4b1
commit
8e18df8c36
3062 changed files with 15044 additions and 172506 deletions
|
@ -7,8 +7,6 @@
|
|||
|
||||
namespace Drupal\node\Tests\Migrate\d6;
|
||||
|
||||
use Drupal\migrate\Entity\Migration;
|
||||
|
||||
/**
|
||||
* Node content revisions migration.
|
||||
*
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
namespace Drupal\node\Tests\Migrate\d6;
|
||||
|
||||
use Drupal\migrate\Entity\MigrationInterface;
|
||||
use Drupal\migrate_drupal\Tests\d6\MigrateDrupal6TestBase;
|
||||
use Drupal\user\Entity\User;
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class MigrateNodeTest extends MigrateDrupal7TestBase {
|
|||
*/
|
||||
public function testNode() {
|
||||
$this->assertEntity(1, 'test_content_type', 'en', 'A Node', '2', TRUE, '1421727515', '1441032132', TRUE, FALSE);
|
||||
$this->assertRevision(1, 'A Node', '2', NULL, '1441032132');
|
||||
$this->assertRevision(1, 'A Node', '1', NULL, '1441032132');
|
||||
|
||||
$node = Node::load(1);
|
||||
$this->assertTrue($node->field_boolean->value);
|
||||
|
|
|
@ -7,13 +7,10 @@
|
|||
|
||||
namespace Drupal\node\Tests;
|
||||
|
||||
use Drupal\Core\Field\Entity\BaseFieldOverride;
|
||||
use Drupal\field\Entity\FieldConfig;
|
||||
use Drupal\field\Entity\FieldStorageConfig;
|
||||
use Drupal\node\Entity\Node;
|
||||
use Drupal\node\Entity\NodeType;
|
||||
use Drupal\simpletest\KernelTestBase;
|
||||
use Drupal\system\Tests\Entity\EntityUnitTestBase;
|
||||
|
||||
/**
|
||||
* Tests node body field storage.
|
||||
|
|
|
@ -9,7 +9,6 @@ namespace Drupal\node\Tests;
|
|||
|
||||
use Drupal\Core\Entity\EntityInterface;
|
||||
use Drupal\system\Tests\Entity\EntityWithUriCacheTagsTestBase;
|
||||
use Drupal\user\Entity\Role;
|
||||
|
||||
/**
|
||||
* Tests the Node entity's cache tags.
|
||||
|
|
|
@ -28,12 +28,19 @@ class NodeTypeTranslationTest extends WebTestBase {
|
|||
'node',
|
||||
);
|
||||
|
||||
/**
|
||||
* The default language code to use in this test.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $defaultLangcode = 'fr';
|
||||
|
||||
/**
|
||||
* Languages to enable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $langcodes = array('fr');
|
||||
protected $additionalLangcodes = ['es'];
|
||||
|
||||
/**
|
||||
* Administrator user for tests.
|
||||
|
@ -56,11 +63,26 @@ class NodeTypeTranslationTest extends WebTestBase {
|
|||
$this->adminUser = $this->drupalCreateUser($admin_permissions);
|
||||
|
||||
// Add languages.
|
||||
foreach ($this->langcodes as $langcode) {
|
||||
foreach ($this->additionalLangcodes as $langcode) {
|
||||
ConfigurableLanguage::createFromLangcode($langcode)->save();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*
|
||||
* Install Drupal in a language other than English for this test. This is not
|
||||
* needed to test the node type translation itself but acts as a regression
|
||||
* test.
|
||||
*
|
||||
* @see https://www.drupal.org/node/2584603
|
||||
*/
|
||||
protected function installParameters() {
|
||||
$parameters = parent::installParameters();
|
||||
$parameters['parameters']['langcode'] = $this->defaultLangcode;
|
||||
return $parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Tests the node type translation.
|
||||
*/
|
||||
|
@ -71,14 +93,13 @@ class NodeTypeTranslationTest extends WebTestBase {
|
|||
$this->drupalCreateContentType(array('type' => $type, 'name' => $name));
|
||||
|
||||
// Translate the node type name.
|
||||
$langcode = $this->langcodes[0];
|
||||
$langcode = $this->additionalLangcodes[0];
|
||||
$translated_name = $langcode . '-' . $name;
|
||||
$edit = array(
|
||||
"translation[config_names][node.type.$type][name]" => $translated_name,
|
||||
);
|
||||
|
||||
// Edit the title label to avoid having an exception when we save the translation.
|
||||
$this->drupalPostForm("admin/structure/types/manage/$type", array('title_label' => 'Edited title'), t('Save content type'));
|
||||
$this->drupalPostForm("admin/structure/types/manage/$type/translate/$langcode/add", $edit, t('Save translation'));
|
||||
|
||||
// Check the name is translated without admin theme for editing.
|
||||
|
@ -100,7 +121,7 @@ class NodeTypeTranslationTest extends WebTestBase {
|
|||
$name = $this->randomString();
|
||||
$this->drupalLogin($this->adminUser);
|
||||
$this->drupalCreateContentType(array('type' => $type, 'name' => $name));
|
||||
$langcode = $this->langcodes[0];
|
||||
$langcode = $this->additionalLangcodes[0];
|
||||
|
||||
// Edit the title label for it to be displayed on the translation form.
|
||||
$this->drupalPostForm("admin/structure/types/manage/$type", array('title_label' => 'Edited title'), t('Save content type'));
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
|
||||
namespace Drupal\node\Tests\Views;
|
||||
|
||||
use Drupal\views\Views;
|
||||
use Drupal\node\Tests\Views\NodeTestBase;
|
||||
|
||||
/**
|
||||
* Tests replacement of Views tokens supplied by the Node module.
|
||||
*
|
||||
|
|
Reference in a new issue