/** * @dataProvider providerTestViewFunction * @covers Generator::view_function */ function testViewFunction($id) { $result = Generator::view_function('index', $id); $this->assertEquals($id ? 1 : 0, preg_match('#\\($id\\)#', $result)); }