public function ProductVariationTest::testDeleteIncomplete in Commerce Core 8.2
@covers ::toUrl
File
- modules/
product/ tests/ src/ Kernel/ Entity/ ProductVariationTest.php, line 264
Class
- ProductVariationTest
- Tests the Product variation entity.
Namespace
Drupal\Tests\commerce_product\Kernel\EntityCode
public function testDeleteIncomplete() {
// Confirm that a variation can be deleted even if it has no product.
$variation = ProductVariation::create([
'type' => 'default',
'sku' => strtolower($this
->randomMachineName()),
'title' => $this
->randomString(),
]);
$variation
->save();
$variation
->delete();
}