public getDataCollection ( ) : |
||
return |
public function getDataCollection()
{
if (!isset($this->collection)) {
throw new \LogicException('Data collection has not been set yet - call setDataCollection');
}
return $this->collection;
}
/** * tests setter and getter for the data collection * * @group data * @group sourcetest */ public function testGetDataCollectionReturnsSameDatacollectionAsInserted() { $mockCollection = $this->getMock('\\Browscap\\Data\\DataCollection', array(), array(), '', false); $this->object->setLogger($this->logger); self::assertSame($this->object, $this->object->setDataCollection($mockCollection)); self::assertSame($mockCollection, $this->object->getDataCollection()); }