public function UnsetLineItemTest::testAccessWithPaymentAsObject in Payment 8.2
@covers ::access
File
- tests/
src/ Unit/ Plugin/ Action/ UnsetLineItemTest.php, line 125  
Class
- UnsetLineItemTest
 - @coversDefaultClass \Drupal\payment\Plugin\Action\UnsetLineItem
 
Namespace
Drupal\Tests\payment\Unit\Plugin\ActionCode
public function testAccessWithPaymentAsObject() {
  $account = $this
    ->createMock(AccountInterface::class);
  $access_result = new AccessResultAllowed();
  $payment = $this
    ->createMock(PaymentInterface::class);
  $payment
    ->expects($this
    ->atLeastOnce())
    ->method('access')
    ->with('update', $account, TRUE)
    ->willReturn($access_result);
  $this
    ->assertSame($access_result, $this->sut
    ->access($payment, $account, TRUE));
}