public function StoreTest::testDeleteStore in Commerce Core 8.2
Tests deleting a store.
File
- modules/
store/ tests/ src/ FunctionalJavascript/ StoreTest.php, line 110
Class
- StoreTest
- Tests the store UI.
Namespace
Drupal\Tests\commerce_store\FunctionalJavascriptCode
public function testDeleteStore() {
$store = $this
->createStore();
$this
->drupalGet($store
->toUrl('delete-form'));
$this
->assertSession()
->pageTextContains('This action cannot be undone.');
$this
->submitForm([], t('Delete'));
$this->container
->get('entity_type.manager')
->getStorage('commerce_store')
->resetCache([
$store
->id(),
]);
$store_exists = (bool) Store::load($store
->id());
$this
->assertEmpty($store_exists);
}