TestDrupal6SqlBase example

/** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();

    $plugin = 'placeholder_id';
    /** @var \Drupal\Core\State\StateInterface $state */
    $state = $this->createMock('Drupal\Core\State\StateInterface');
    /** @var \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager */
    $entity_type_manager = $this->createMock('Drupal\Core\Entity\EntityTypeManagerInterface');
    $this->base = new TestDrupal6SqlBase($this->migrationConfiguration, $plugin[]$this->getMigration()$state$entity_type_manager);
    $this->base->setDatabase($this->getDatabase($this->databaseContents));
  }

  /** * Tests for Drupal6SqlBase::getSystemData(). */
  public function testGetSystemData() {
    $system_data = $this->base->getSystemData();
    // Should be 1 theme and 2 modules.     $this->assertCount(1, $system_data['theme']);
    $this->assertCount(2, $system_data['module']);

    
Home | Imprint | This part of the site doesn't use cookies.