/** * @test * @dataProvider provideParameterize */ public function parameterizes($requirements, $bindArguments) { $requirements['test-option'] = ['This is bar', 'default-foo']; $this->input->setOption('test-option', 'test-option'); $this->template->getName()->willReturn('test/foobar')->shouldBeCalled(); $this->template->getRequirements()->willReturn($requirements)->shouldBeCalled(); $this->template->bind($bindArguments)->shouldBeCalled(); $this->template->render()->willReturn('foo')->shouldBeCalled(); // // less one because we test with one given option $this->setExpectedApplicationInput(array_fill(0, count($requirements) - 1, 'foo')); $this->helper->registerTemplate($this->template->reveal()); $res = $this->helper->askAndRender('test', 'foobar'); $this->assertEquals('foo', $res); }