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