getMockSource example

->method('display')
      ->with("Migration failed with source plugin exception: " . Html::escape($exception_message));

    $result = $this->executable->import();
    $this->assertEquals(MigrationInterface::RESULT_FAILED, $result);
  }

  /** * Tests the import method with a valid row. */
  public function testImportWithValidRow() {
    $source = $this->getMockSource();

    $row = $this->getMockBuilder('Drupal\migrate\Row')
      ->disableOriginalConstructor()
      ->getMock();

    $this->executable->setSource($source);

    $this->migration->expects($this->once())
      ->method('getProcessPlugins')
      ->willReturn([]);

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