/**
  * Test method getPageRecords
  *
  * @test
  */
 public function getPageRecordsTest()
 {
     // 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->getPagelist($rootPage);
     $pageRecords = $this->indexerTypes->getPageRecords($pidArray);
     // check if it is of type array
     $this->assertInternalType('array', $pageRecords);
     // there should be at last 1 record
     $this->assertGreaterThanOrEqual(1, count($pageRecords));
     // check for some array keys which have to be present
     $this->assertArrayHasKey('uid', $pageRecords[$rootPage]);
     $this->assertArrayHasKey('title', $pageRecords[$rootPage]);
     $this->assertNotEmpty($pageRecords[$rootPage]['uid']);
     $this->assertNotEmpty($pageRecords[$rootPage]['title']);
 }