Commit 7bba6c16 authored by salvis's avatar salvis

Issue #2659944 by salvis: Test failure: Yet another attempt...

parent 74db41b1
......@@ -4,7 +4,8 @@ CHANGELOG for ACL for Drupal 8
acl 8.x-1.x-dev:
Fixes:
- OC#2951661 by nevergone: Add source_module and destination_module property for migrations.
- #2659944 by salvis: Test failure: Yet another attempt...
- #2951661 by nevergone: Add source_module and destination_module property for migrations.
- #2659944 by salvis: Test failure: Adjust more namespaces for D81.
- #2659944 by salvis: Test failure: Adjust namespace for MigrateDestinationInterface base interface for D81, too.
- #2659944 by salvis: Test failure: Adjust namespace for MigrateDrupal7TestBase base class for D81, too.
......
......@@ -41,6 +41,7 @@ trait AclMigrationTestTrait {
// Testing first migrated node grants.
$node = Node::load(1);
$this->assertNotNull($node, "Node 1 can be loaded");
$grants = \Drupal::entityManager()
->getAccessControlHandler('node')
->acquireGrants($node);
......
......@@ -2,7 +2,7 @@
/**
* @file
* Contains \Drupal\acl\Tests\Migrate\d6\MigrateAclListTest.
* Contains \Drupal\acl\Tests\Migrate\d6\MigrateAclList68Test.
*/
namespace Drupal\acl\Tests\Migrate\d6;
......@@ -18,14 +18,14 @@ use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
*
* @group acl
*/
class MigrateAclListTest extends MigrateDrupal6TestBase {
class MigrateAclList68Test extends MigrateDrupal6TestBase {
use AclMigrationTestTrait;
/**
* Modules to load.
*/
public static $modules = ['migrate_drupal', 'node', 'acl', 'acl_node_test'];
public static $modules = ['migrate_drupal', 'node', 'menu_ui', 'acl', 'acl_node_test'];
/**
* {@inheritdoc}
......@@ -41,7 +41,7 @@ class MigrateAclListTest extends MigrateDrupal6TestBase {
$this->executeMigration('d6_d7_acl_user');
$this->executeMigration('d6_d7_acl_node');
$this->migrateContent(TRUE);
$this->migrateContent();
}
}
......@@ -2,12 +2,13 @@
/**
* @file
* Contains \Drupal\acl\Tests\Migrate\d7\MigrateAclListTest.
* Contains \Drupal\acl\Tests\Migrate\d7\MigrateAclList78Test.
*/
namespace Drupal\acl\Tests\Migrate\d7;
use Drupal\acl\Tests\AclMigrationTestTrait;
use Drupal\taxonomy\Entity\Vocabulary;
use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
/**
......@@ -15,7 +16,7 @@ use Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase;
*
* @group acl
*/
class MigrateAclListTest extends MigrateDrupal7TestBase {
class MigrateAclList78Test extends MigrateDrupal7TestBase {
use AclMigrationTestTrait;
......@@ -31,6 +32,7 @@ class MigrateAclListTest extends MigrateDrupal7TestBase {
'filter',
'image',
'link',
'menu_ui',
'node',
'taxonomy',
'telephone',
......@@ -53,9 +55,11 @@ class MigrateAclListTest extends MigrateDrupal7TestBase {
$this->installEntitySchema('node');
$this->installEntitySchema('comment');
$this->installEntitySchema('taxonomy_vocabulary');
$this->installEntitySchema('taxonomy_term');
$this->installConfig(static::$modules);
$this->installSchema('system', ['sequences']);
Vocabulary::create(['name' => 'TestVocabulary', 'vid' => 'test_vocabulary'])->save();
$this->executeMigrations([
'd7_user_role',
......
......@@ -8,6 +8,30 @@ use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$connection->insert('system')
->fields(array(
'filename',
'name',
'type',
'owner',
'status',
'bootstrap',
'schema_version',
'weight',
))
->values(array(
'filename' => 'modules/acl/acl.module',
'name' => 'acl',
'type' => 'module',
'owner' => '',
'status' => '1',
'bootstrap' => '0',
'schema_version' => '6000',
'weight' => '0',
))
->execute();
$connection->schema()->createTable(
'acl',
[
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment