Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / console / Tests / Helper / AbstractQuestionHelperTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Console\Tests\Helper;
13
14 use PHPUnit\Framework\TestCase;
15 use Symfony\Component\Console\Input\StreamableInputInterface;
16
17 abstract class AbstractQuestionHelperTest extends TestCase
18 {
19     protected function createStreamableInputInterfaceMock($stream = null, $interactive = true)
20     {
21         $mock = $this->getMockBuilder(StreamableInputInterface::class)->getMock();
22         $mock->expects($this->any())
23             ->method('isInteractive')
24             ->will($this->returnValue($interactive));
25
26         if ($stream) {
27             $mock->expects($this->any())
28                 ->method('getStream')
29                 ->willReturn($stream);
30         }
31
32         return $mock;
33     }
34 }