/** * @dataProvider providerUsage * @param array $row * @param string $name * @param string $type * @param string $outputExpected * @return void */ public function testUsage($row, $name, $type, $outputExpected) { $this->field->expects($this->any())->method('isType')->will($this->returnCallback(function () use($type) { return in_array($type, func_get_args(), true); })); $this->field->expects($this->any())->method('getName')->will($this->returnValue($name)); $output = $this->csvCellContentFieldsHelper->render($this->field, $row, 0, 0); $this->assertInternalType('string', $output); $this->assertSame($outputExpected, $output); }