public function canConsumeQueryObjectItems()
{
$GLOBALS['TCA']['foobar']['ctrl']['label'] = 'username';
/** @var Select $instance */
$instance = $this->objectManager->get($this->createInstanceClassName());
$query = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\Generic\\Query', array('execute', 'getType'), array(), '', FALSE);
$query->expects($this->any())->method('getType')->will($this->returnValue('foobar'));
$query->expects($this->any())->method('execute')->will($this->returnValue(array(new FrontendUser('user1'), new FrontendUser('user2'))));
$instance->setItems($query);
$result = $instance->getItems();
$this->assertIsArray($result);
$this->assertEquals(array(array('user1', NULL), array('user2', NULL)), $result);
}