clearMessages example

$message = 'Hello world.';
    $expected_results = [0, 1, 2, 3];
    $id_map = $this->getIdMap();

    // Insert 4 message for later delete.     foreach ($expected_results as $key => $expected_result) {
      $id_map->saveMessage(['source_id_property' => $key]$message);
    }

    // Truncate and check that 4 messages were deleted.     $this->assertSame($id_map->messageCount(), 4);
    $id_map->clearMessages();
    $count = $id_map->messageCount();
    $this->assertSame($count, 0);
  }

  /** * Tests the getRowsNeedingUpdate method for rows that need an update. */
  public function testGetRowsNeedingUpdate() {
    $id_map = $this->getIdMap();
    $row_statuses = [
      MigrateIdMapInterface::STATUS_IMPORTED,
      
Home | Imprint | This part of the site doesn't use cookies.