示例#1
0
 /**
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::__construct
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::setProfiler
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::getProfiler
  * @uses Fabfuel\Prophiler\Toolbar\Formatter\BenchmarkFormatterAbstract
  */
 public function testSetAndGetProfiler()
 {
     $profilerA = $this->getMock('Fabfuel\\Prophiler\\ProfilerInterface');
     $profilerB = $this->getMock('Fabfuel\\Prophiler\\ProfilerInterface');
     $formatter = new TimelineFormatter($profilerA);
     $this->assertSame($profilerA, $formatter->getProfiler());
     $formatter->setProfiler($profilerB);
     $this->assertSame($profilerB, $formatter->getProfiler());
 }
 /**
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::__construct
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::setProfiler
  * @covers Fabfuel\Prophiler\Toolbar\Formatter\TimelineFormatter::getProfiler
  * @uses Fabfuel\Prophiler\Toolbar\Formatter\BenchmarkFormatterAbstract
  */
 public function testSetAndGetProfiler()
 {
     $profiler = $this->getProfilerMock();
     $formatter = new TimelineFormatter($profiler);
     $this->assertSame($profiler, $formatter->getProfiler());
     $anotherProfiler = $this->getProfilerMock();
     $this->assertNotSame($anotherProfiler, $formatter->getProfiler());
     $formatter->setProfiler($anotherProfiler);
     $this->assertSame($anotherProfiler, $formatter->getProfiler());
 }