/**
  * Test method getPidList
  *
  * @test
  */
 public function getPidListTest()
 {
     // get the rootPage UID. In most cases it should have recursive child elements
     $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid', 'pages', 'deleted=0 AND hidden=0 AND is_siteroot=1', '', '', '1');
     if (count($rows) > 0) {
         $rootPage = $rows[0]['uid'];
     } else {
         $rootPage = 1;
     }
     $pidArray = $this->indexerTypes->getPidList($rootPage, '', 'tt_news');
     // check if it is of type array
     $this->assertInternalType('array', $pidArray);
     // there should be at last 1 record
     $this->assertGreaterThanOrEqual(1, count($pidArray));
     foreach ($pidArray as $pid) {
         $this->assertInternalType('integer', $pid);
     }
     $pidArray = $this->indexerTypes->getPidList('', $rootPage, 'tt_news');
     // check if it is of type array
     $this->assertInternalType('array', $pidArray);
     // there should be 1 record
     $this->assertEquals(1, count($pidArray));
     $this->assertInternalType('integer', $pidArray[0]);
 }