/** * @dataProvider getComponentDataProvider() */ public function testCreateRawComponentData($componentName, $configData, $componentData, $needEvaluate) { $this->componentConfigProvider->expects($this->any())->method('getComponentData')->willReturn($configData); if ($needEvaluate === true) { $this->argumentInterpreter->expects($this->once())->method('evaluate')->willReturnCallback(function ($argument) { return ['argument' => $argument['value']]; }); } else { $this->argumentInterpreter->expects($this->never())->method('evaluate'); } $this->assertEquals($componentData, $this->manager->createRawComponentData($componentName, $needEvaluate)); }