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

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

public setUp ( )
    public function setUp()
    {
        $this->suite = $this->prophesize(Suite::class);
        $this->summary = $this->prophesize(Summary::class);
        $this->benchmark = $this->prophesize(Benchmark::class);
        $this->variant = $this->prophesize(Variant::class);
        $this->subject = $this->prophesize(Subject::class);
        $this->parameterSet = $this->prophesize(ParameterSet::class);
        $this->output = $this->prophesize(OutputInterface::class);
        $this->stats = $this->prophesize(Distribution::class);
        $this->logger = $this->getLogger();
        if ($this->logger instanceof OutputAwareInterface) {
            $this->logger->setOutput($this->output->reveal());
        }
        $this->suite->getSummary()->willReturn($this->summary->reveal());
        $this->stats->getMean()->willReturn(1.0);
        $this->stats->getMode()->willReturn(1.0);
        $this->stats->getStdev()->willReturn(2.0);
        $this->stats->getRstdev()->willReturn(20);
    }

Usage Example

Пример #1
0
 public function setUp()
 {
     parent::setUp();
 }