You are here

protected function CommentTestBase::setUp in Zircon Profile 8

Same name in this branch
  1. 8 core/modules/comment/src/Tests/CommentTestBase.php \Drupal\comment\Tests\CommentTestBase::setUp()
  2. 8 core/modules/comment/src/Tests/Views/CommentTestBase.php \Drupal\comment\Tests\Views\CommentTestBase::setUp()
  3. 8 core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php \Drupal\Tests\comment\Unit\Migrate\d6\CommentTestBase::setUp()
Same name and namespace in other branches
  1. 8.0 core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php \Drupal\Tests\comment\Unit\Migrate\d6\CommentTestBase::setUp()

Overrides MigrateSqlSourceTestCase::setUp

1 call to CommentTestBase::setUp()
CommentSourceWithHighWaterTest::setUp in core/modules/comment/tests/src/Unit/Migrate/d6/CommentSourceWithHighWaterTest.php
1 method overrides CommentTestBase::setUp()
CommentSourceWithHighWaterTest::setUp in core/modules/comment/tests/src/Unit/Migrate/d6/CommentSourceWithHighWaterTest.php

File

core/modules/comment/tests/src/Unit/Migrate/d6/CommentTestBase.php, line 74
Contains \Drupal\Tests\comment\Unit\Migrate\d6\CommentTestBase.

Class

CommentTestBase
Base class for comment source unit tests.

Namespace

Drupal\Tests\comment\Unit\Migrate\d6

Code

protected function setUp() {
  foreach ($this->expectedResults as $k => $row) {
    $this->databaseContents['comments'][$k] = $row;
    $this->databaseContents['comments'][$k]['status'] = 1 - $this->databaseContents['comments'][$k]['status'];
  }

  // Add node table data.
  $this->databaseContents['node'][] = array(
    'nid' => 2,
    'type' => 'story',
  );
  $this->databaseContents['node'][] = array(
    'nid' => 3,
    'type' => 'page',
  );
  parent::setUp();
}