PhpBench\Tests\Unit\Progress\Logger\HistogramLoggerTest::setUp PHP Метод

setUp() публичный Метод

public setUp ( )
    public function setUp()
    {
        $this->output = new BufferedOutput();
        $this->timeUnit = new TimeUnit(TimeUnit::MICROSECONDS, TimeUnit::MILLISECONDS);
        $this->logger = new HistogramLogger($this->timeUnit);
        $this->logger->setOutput($this->output);
        $this->benchmark = $this->prophesize(Benchmark::class);
        $this->subject = $this->prophesize(Subject::class);
        $this->iteration = $this->prophesize(Iteration::class);
        $this->variant = new Variant($this->subject->reveal(), new ParameterSet(), 1, 0);
        $this->variant->spawnIterations(4);
        $this->benchmark->getSubjects()->willReturn([$this->subject->reveal()]);
        $this->benchmark->getClass()->willReturn('BenchmarkTest');
        $this->subject->getName()->willReturn('benchSubject');
        $this->subject->getIndex()->willReturn(1);
        $this->subject->getOutputTimeUnit()->willReturn('milliseconds');
        $this->subject->getOutputMode()->willReturn('time');
        $this->subject->getRetryThreshold()->willReturn(10);
        $this->subject->getOutputTimePrecision()->willReturn(3);
    }