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;
}