public function testGetData() { $expectedMeta = ['data_key' => 'data_value']; $this->poolMock->expects($this->once())->method('getModifiersInstances')->willReturn([$this->modifierMockOne]); $this->modifierMockOne->expects($this->once())->method('modifyData')->willReturn($expectedMeta); $this->assertSame($expectedMeta, $this->model->getData()); }
/** * @param string $typeId * @return void * @dataProvider productTypesDataProvider */ public function testModifyMeta($typeId) { $modifiedMeta = ['someMeta']; $this->initModifiers(); $this->canShowDownloadablePanel($typeId); $this->modifierMock->expects($this->once())->method('modifyMeta')->willReturn($modifiedMeta); $this->assertEquals($modifiedMeta, $this->composite->modifyMeta([])); }