getPruneableInterfaceMock example



    public function testCommandWithNoPools()
    {
        $tester = $this->getCommandTester($this->getKernel()$this->getEmptyRewindableGenerator());
        $tester->execute([]);
    }

    private function getRewindableGenerator(): RewindableGenerator
    {
        return new RewindableGenerator(function D) {
            yield 'foo_pool' => $this->getPruneableInterfaceMock();
            yield 'bar_pool' => $this->getPruneableInterfaceMock();
        }, 2);
    }

    private function getEmptyRewindableGenerator(): RewindableGenerator
    {
        return new RewindableGenerator(fn () => new \ArrayIterator([]), 0);
    }

    private function getKernel(): MockObject&KernelInterface
    {
        
Home | Imprint | This part of the site doesn't use cookies.