public function ProductLayoutBuilderIntegrationTest::testProductWithoutVariationsDoesNotCrash in Commerce Core 8.2
Make sure products without a variation do not crash.
File
- modules/
product/ tests/ src/ FunctionalJavascript/ ProductLayoutBuilderIntegrationTest.php, line 126
Class
- ProductLayoutBuilderIntegrationTest
- @group commerce
Namespace
Drupal\Tests\commerce_product\FunctionalJavascriptCode
public function testProductWithoutVariationsDoesNotCrash() {
$this
->enableLayoutsForBundle('default', TRUE);
$this
->configureDefaultLayout('default');
$product = $this
->createEntity('commerce_product', [
'type' => 'default',
'title' => $this
->randomMachineName(),
'stores' => $this->stores,
'body' => [
'value' => 'Testing product does not crash!',
],
]);
$this
->drupalGet($product
->toUrl());
$this
->assertSession()
->pageTextContains('Testing product does not crash!');
}