You are here

protected property NodeRevisionTest::$databaseContents in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeRevisionTest.php \Drupal\Tests\node\Unit\Plugin\migrate\source\d6\NodeRevisionTest::databaseContents

The database contents.

Database contents represents a mocked database. It should contain an associative array with the table name as key, and as many nested arrays as the number of mocked rows. Each of those faked rows must be another array with the column name as the key and the value as the cell.

Type: array

Overrides MigrateSqlSourceTestCase::$databaseContents

File

core/modules/node/tests/src/Unit/Plugin/migrate/source/d6/NodeRevisionTest.php, line 40
Contains \Drupal\Tests\node\Unit\Plugin\migrate\source\d6\NodeRevisionTest.

Class

NodeRevisionTest
Tests D6 node revision source plugin.

Namespace

Drupal\Tests\node\Unit\Plugin\migrate\source\d6

Code

protected $databaseContents = [
  'node' => [
    [
      'nid' => 1,
      'type' => 'page',
      'language' => 'en',
      'status' => 1,
      'created' => 1279051598,
      'changed' => 1279051598,
      'comment' => 2,
      'promote' => 1,
      'moderate' => 0,
      'sticky' => 0,
      'tnid' => 0,
      'translate' => 0,
      'vid' => 4,
      'uid' => 1,
      'title' => 'title for revision 1 (node 1)',
    ],
    [
      'nid' => 2,
      'type' => 'article',
      'language' => 'en',
      'status' => 1,
      'created' => 1279290908,
      'changed' => 1279308993,
      'comment' => 0,
      'promote' => 1,
      'moderate' => 0,
      'sticky' => 0,
      'tnid' => 0,
      'translate' => 0,
      'vid' => 2,
      'uid' => 1,
      'title' => 'title for revision 2 (node 2)',
    ],
  ],
  'node_revisions' => [
    [
      'nid' => 1,
      'vid' => 1,
      'uid' => 1,
      'title' => 'title for revision 1 (node 1)',
      'body' => 'body for revision 1 (node 1)',
      'teaser' => 'teaser for revision 1 (node 1)',
      'log' => 'log for revision 1 (node 1)',
      'format' => 1,
      'timestamp' => 1279051598,
    ],
    [
      'nid' => 1,
      'vid' => 3,
      'uid' => 1,
      'title' => 'title for revision 3 (node 1)',
      'body' => 'body for revision 3 (node 1)',
      'teaser' => 'teaser for revision 3 (node 1)',
      'log' => 'log for revision 3 (node 1)',
      'format' => 1,
      'timestamp' => 1279051598,
    ],
    [
      'nid' => 1,
      'vid' => 4,
      'uid' => 1,
      'title' => 'title for revision 4 (node 1)',
      'body' => 'body for revision 4 (node 1)',
      'teaser' => 'teaser for revision 4 (node 1)',
      'log' => 'log for revision 4 (node 1)',
      'format' => 1,
      'timestamp' => 1279051598,
    ],
    [
      'nid' => 2,
      'vid' => 2,
      'uid' => 1,
      'title' => 'title for revision 2 (node 2)',
      'body' => 'body for revision 2 (node 2)',
      'teaser' => 'teaser for revision 2 (node 2)',
      'log' => 'log for revision 2 (node 2)',
      'format' => 1,
      'timestamp' => 1279308993,
    ],
  ],
];