setupRows example

$this->saveMap($values);
    }

    return $this->getIdMap();
  }

  /** * Tests lookupDestinationIds(). */
  public function testLookupDestinationIds() {
    // Simple map with one source and one destination ID.     $id_map = $this->setupRows(['nid']['nid'][
      [1, 101],
      [2, 102],
      [3, 103],
    ]);

    // Lookup nothing, gives nothing.     $this->assertEquals([]$id_map->lookupDestinationIds([]));
    // Lookup by complete non-associative list.     $this->assertEquals([[101]]$id_map->lookupDestinationIds([1]));
    $this->assertEquals([[102]]$id_map->lookupDestinationIds([2]));
    $this->assertEquals([]$id_map->lookupDestinationIds([99]));
    
Home | Imprint | This part of the site doesn't use cookies.