You are here

protected function CartAddResourceSelectStoreExceptionTest::getController in Commerce Cart API 8

Gets the controller to test.

Return value

\Drupal\commerce_cart_api\Plugin\rest\resource\CartAddResource The controller.

2 calls to CartAddResourceSelectStoreExceptionTest::getController()
CartAddResourceSelectStoreExceptionTest::testNoStoresException in tests/src/Kernel/CartAddResourceSelectStoreExceptionTest.php
Tests exception when product has no stores.
CartAddResourceSelectStoreExceptionTest::testNotCurrentStoreException in tests/src/Kernel/CartAddResourceSelectStoreExceptionTest.php
Tests exception when product's stores is not a current store.

File

tests/src/Kernel/CartAddResourceSelectStoreExceptionTest.php, line 116

Class

CartAddResourceSelectStoreExceptionTest
@group commerce_cart_api

Namespace

Drupal\Tests\commerce_cart_api\Kernel

Code

protected function getController() {
  return new CartAddResource([], 'cart_add_resource', [], [
    'json',
  ], $this->container
    ->get('logger.channel.default'), $this->container
    ->get('commerce_cart.cart_provider'), $this->container
    ->get('commerce_cart.cart_manager'), $this->container
    ->get('entity_type.manager'), $this->container
    ->get('commerce_order.chain_order_type_resolver'), $this->container
    ->get('commerce_store.current_store'), $this->container
    ->get('commerce_price.chain_price_resolver'), $this->container
    ->get('current_user'), $this->container
    ->get('entity.repository'));
}