Symfony\Component\Console\Tests\Helper\AbstractQuestionHelperTest::createStreamableInputInterfaceMock PHP Method

createStreamableInputInterfaceMock() protected method

protected createStreamableInputInterfaceMock ( $stream = null, $interactive = true )
    protected function createStreamableInputInterfaceMock($stream = null, $interactive = true)
    {
        $mock = $this->getMockBuilder(StreamableInputInterface::class)->getMock();
        $mock->expects($this->any())
            ->method('isInteractive')
            ->will($this->returnValue($interactive));

        if ($stream) {
            $mock->expects($this->any())
                ->method('getStream')
                ->willReturn($stream);
        }

        return $mock;
    }
AbstractQuestionHelperTest