authorizationMock = $this->createMock(AuthorizationInterface::class); $this->plugin = new \Magento\AsynchronousOperations\Ui\Component\AdminNotification\Plugin( $this->authorizationMock ); } public function testAfterGetMeta() { $result = []; $expectedResult = [ 'columns' => [ 'arguments' => [ 'data' => [ 'config' => [ 'isAllowed' => true ] ] ] ] ]; $dataProviderMock = $this->createMock(\Magento\AdminNotification\Ui\Component\DataProvider\DataProvider::class); $this->authorizationMock->expects($this->once())->method('isAllowed')->willReturn(true); $this->assertEquals($expectedResult, $this->plugin->afterGetMeta($dataProviderMock, $result)); } }