protected function AjaxAddCartTestBase::setUp in Commerce Ajax Add to Cart 8
Overrides CartBrowserTestBase::setUp
2 calls to AjaxAddCartTestBase::setUp()
- AjaxAddCartUpdateCartBlockTest::setUp in tests/
src/ FunctionalJavascript/ AjaxAddCartUpdateCartBlockTest.php - AjaxAddCartViewsTestBase::setUp in modules/
dc_ajax_add_cart_views/ tests/ src/ Functional/ AjaxAddCartViewsTestBase.php
2 methods override AjaxAddCartTestBase::setUp()
- AjaxAddCartUpdateCartBlockTest::setUp in tests/
src/ FunctionalJavascript/ AjaxAddCartUpdateCartBlockTest.php - AjaxAddCartViewsTestBase::setUp in modules/
dc_ajax_add_cart_views/ tests/ src/ Functional/ AjaxAddCartViewsTestBase.php
File
- tests/
src/ Functional/ AjaxAddCartTestBase.php, line 29
Class
- AjaxAddCartTestBase
- Base class for ajax add cart tests.
Namespace
Drupal\Tests\dc_ajax_add_cart\FunctionalCode
protected function setUp() {
parent::setUp();
// Change commerce_product variation view display to dc_ajax_add_cart.
\Drupal::entityTypeManager()
->getStorage('entity_view_display')
->load('commerce_product.default.default')
->setComponent('variations', [
'type' => 'dc_ajax_add_cart',
'settings' => [
'default_quantity' => '1',
'combine' => TRUE,
'show_quantity' => FALSE,
],
'weight' => 0,
'label' => 'hidden',
'region' => 'content',
])
->save();
}