Beispiel #1
0
 /**
  * @covers Fabfuel\Prophiler\Toolbar::addDataCollector
  * @covers Fabfuel\Prophiler\Toolbar::getDataCollectors
  * @uses Fabfuel\Prophiler\Toolbar
  */
 public function testAddAndGetDataCollectors()
 {
     $profiler = $this->getMockBuilder('Fabfuel\\Prophiler\\Profiler')->disableOriginalConstructor()->getMock();
     $toolbar = new Toolbar($profiler);
     $this->assertCount(0, $toolbar->getDataCollectors());
     $dataCollector = $this->getMock('Fabfuel\\Prophiler\\DataCollector\\Request');
     $toolbar->addDataCollector($dataCollector);
     $this->assertCount(1, $toolbar->getDataCollectors());
     $this->assertSame($dataCollector, $toolbar->getDataCollectors()[0]);
 }