public function testUpdate() { $arguments = ['cancel_order' => null, 'hold_order' => null, 'unhold_order' => null, 'other' => null]; $this->authorizationMock->expects($this->exactly(3))->method('isAllowed')->willReturnMap([['Magento_Sales::cancel', null, false], ['Magento_Sales::hold', null, false], ['Magento_Sales::unhold', null, false]]); $this->assertEquals(['other' => null], $this->itemUpdater->update($arguments)); }
/** * @param bool $isAllowed * @param bool $expectedResult * @dataProvider isHiddenDataProvider */ public function testIsHidden($isAllowed, $expectedResult) { $this->authorizationMock->expects($this->any())->method('isAllowed')->with('Magento_Sales::transactions_fetch')->willReturn($isAllowed); $this->assertEquals($expectedResult, $this->transactionsTab->isHidden()); }