NonStringifiable example


        $this->expectException(InvalidArgumentException::class);
        $this->expectExceptionMessage('"Symfony\Component\Process\Process::setInput" only accepts strings, Traversable objects or stream resources.');
        $process = $this->getProcess('foo');
        $process->setInput($value);
    }

    public static function provideInvalidInputValues()
    {
        return [
            [[]],
            [new NonStringifiable()],
        ];
    }

    /** * @dataProvider provideInputValues */
    public function testValidInput($expected$value)
    {
        $process = $this->getProcess('foo');
        $process->setInput($value);
        $this->assertSame($expected$process->getInput());
    }
Home | Imprint | This part of the site doesn't use cookies.