Example #1
0
 /**
  * Tests that the identifier or key is properly identified.
  *
  * @test
  *
  * @covers ::getIds
  */
 public function getIds()
 {
     $configuration = array('path' => $this->happyPath, 'identifiers' => array('id'), 'header_row_count' => 1);
     $csv = new CSV($configuration, $this->pluginId, $this->pluginDefinition, $this->plugin);
     $expected = array('id' => array('type' => 'string'));
     $this->assertArrayEquals($expected, $csv->getIds());
 }
Example #2
0
 /**
  * Tests that the key is properly identified.
  *
  * @test
  *
  * @covers ::getIds
  */
 public function getIds()
 {
     $configuration = ['path' => $this->happyPath, 'keys' => ['id'], 'header_row_count' => 1];
     $csv = new CSV($configuration, $this->pluginId, $this->pluginDefinition, $this->plugin);
     $expected = ['id' => ['type' => 'string']];
     $this->assertArrayEquals($expected, $csv->getIds());
 }