public function StoreTypeTest::testEdit in Commerce Core 8.2
Tests editing a store type.
File
- modules/
store/ tests/ src/ Functional/ StoreTypeTest.php, line 47
Class
- StoreTypeTest
- Tests the store type UI.
Namespace
Drupal\Tests\commerce_store\FunctionalCode
public function testEdit() {
$this
->drupalGet('admin/commerce/config/store-types/online/edit');
$edit = [
'label' => 'Online!',
];
$this
->submitForm($edit, 'Save');
$this
->assertSession()
->pageTextContains('Saved the Online! store type.');
$store_type = StoreType::load('online');
$this
->assertEquals($edit['label'], $store_type
->label());
}