PhpBench\Tests\Benchmark\RunnerTest::setUp PHP Метод

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

public setUp ( )
    public function setUp()
    {
        $this->benchmarkFinder = $this->prophesize(BenchmarkFinder::class);
        $this->suite = $this->prophesize(Suite::class);
        $this->benchmark = $this->prophesize(BenchmarkMetadata::class);
        $this->benchmarkFinder->findBenchmarks(__DIR__, [], [])->willReturn([$this->benchmark->reveal()]);
        $this->executor = $this->prophesize(ExecutorInterface::class);
        $this->executorRegistry = $this->prophesize(ConfigurableRegistry::class);
        $this->executorConfig = new Config('test', ['executor' => 'microtime']);
        $this->envSupplier = $this->prophesize(Supplier::class);
        $this->informations = new \ArrayObject();
        $this->envSupplier->getInformations()->willReturn($this->informations);
        $this->runner = new Runner($this->benchmarkFinder->reveal(), $this->executorRegistry->reveal(), $this->envSupplier->reveal(), null, null);
        $this->executorRegistry->getService('microtime')->willReturn($this->executor->reveal());
        $this->executorRegistry->getConfig('microtime')->willReturn($this->executorConfig);
    }