CommentVariablePerCommentTypeTest.php in Zircon Profile 8.0
File
core/modules/comment/tests/src/Unit/Migrate/d6/CommentVariablePerCommentTypeTest.php
View source
<?php
namespace Drupal\Tests\comment\Unit\Migrate\d6;
use Drupal\comment\Plugin\migrate\source\d6\CommentVariablePerCommentType;
use Drupal\Tests\migrate\Unit\MigrateSqlSourceTestCase;
class CommentVariablePerCommentTypeTest extends MigrateSqlSourceTestCase {
const PLUGIN_CLASS = CommentVariablePerCommentType::class;
protected $migrationConfiguration = array(
'id' => 'test',
'source' => array(
'plugin' => 'd6_comment_variable_per_comment_type',
),
);
protected $expectedResults = array(
array(
'comment_type' => 'comment_no_subject',
),
array(
'comment_type' => 'comment',
),
);
protected function setUp() {
$this->databaseContents['node_type'] = array(
array(
'type' => 'page',
),
array(
'type' => 'story',
),
);
$this->databaseContents['variable'] = array(
array(
'name' => 'comment_subject_field_page',
'value' => serialize(1),
),
array(
'name' => 'comment_subject_field_story',
'value' => serialize(0),
),
);
parent::setUp();
}
}