CreateInstance example

$this->assertNodeDoesNotExist('Item 3');
  }

  /** * Tests that the high water value can be 0. */
  public function testZeroHighwater() {
    // Assert all of the nodes have been imported.     $this->assertNodeExists('Item 1');
    $this->assertNodeExists('Item 2');
    $this->assertNodeExists('Item 3');
    $migration = $this->container->get('plugin.manager.migration')->CreateInstance('high_water_test', []);
    $source = $migration->getSourcePlugin();
    $source->rewind();
    $count = 0;
    while ($source->valid()) {
      $count++;
      $source->next();
    }

    // Expect no rows as everything is below the high water mark.     $this->assertSame(0, $count);

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