/**
  * @test
  */
 public function importingDataSet()
 {
     if (!t3lib_extMgm::isLoaded('ccc')) {
         $this->markTestSkipped('This test can only be run if the extension ccc from ' . 'tests/res is installed.');
     }
     $this->importExtensions(array('ccc'));
     $this->importDataSet(t3lib_extMgm::extPath('phpunit') . 'Tests/Unit/Database/Fixtures/DataSet.xml');
     $result = $this->db->exec_SELECTgetRows('*', 'tx_ccc_test', NULL);
     $this->assertSame(2, count($result), self::DB_PERMISSIONS_MESSAGE);
     $this->assertSame('1', $result[0]['uid']);
     $this->assertSame('2', $result[1]['uid']);
     $result = $this->db->exec_SELECTgetRows('*', 'tx_ccc_data', NULL);
     $this->assertSame(1, count($result));
     $this->assertSame('1', $result[0]['uid']);
     $result = $this->db->exec_SELECTgetRows('*', 'tx_ccc_data_test_mm', NULL);
     $this->assertSame(2, count($result));
     $this->assertSame('1', $result[0]['uid_local']);
     $this->assertSame('1', $result[0]['uid_foreign']);
     $this->assertSame('1', $result[1]['uid_local']);
     $this->assertSame('2', $result[1]['uid_foreign']);
 }
 /**
  * returns fieldvalue from pagerecord. Pageresords are stored internally in $this->pageArray
  *
  * @param $uid
  * @param $fN
  * @return string
  */
 function getPageArrayEntry($uid, $fN)
 {
     // Get pages
     $val = '';
     $L = intval($this->tsfe->sys_language_content);
     if ($uid && $fN) {
         $key = $uid . '_' . $L;
         if (is_array($this->pageArray[$key])) {
             $val = $this->pageArray[$key][$fN];
         } else {
             $rows = $this->db->exec_SELECTgetRows('*', 'pages', 'uid=' . $uid);
             $row = $rows[0];
             // get the translated record if the content language is not the default language
             if ($L) {
                 $row = $this->tsfe->sys_page->getPageOverlay($uid, $L);
             }
             $this->pageArray[$key] = $row;
             $val = $this->pageArray[$key][$fN];
         }
     }
     return $val;
 }