public function TransactionAdminTest::doTestRemoveTransactionType in Transaction 8
Tests transaction type deletion from the admin UI.
See also
\Drupal\transaction\Form\TransactionTypeDeleteForm
1 call to TransactionAdminTest::doTestRemoveTransactionType()
- TransactionAdminTest::testAdmin in tests/
src/ Functional/ TransactionAdminTest.php - Full admin test sequence.
File
- tests/
src/ Functional/ TransactionAdminTest.php, line 209
Class
- TransactionAdminTest
- Tests the transaction administration.
Namespace
Drupal\Tests\transaction\FunctionalCode
public function doTestRemoveTransactionType() {
// Go to the deletion.
$this
->drupalGet('admin/config/workflow/transaction/delete/generic_workflow');
$this
->assertSession()
->pageTextContains('Are you sure you want to delete Generic workflow?');
$this
->drupalPostForm(NULL, [], 'Delete');
$this
->assertSession()
->pageTextContains('Transaction type Generic workflow deleted.');
// Check there as no transaction type.
$this
->assertEmpty(TransactionType::loadMultiple());
// Transaction operations must be gone away as well.
$this
->assertEmpty(TransactionOperation::loadMultiple());
}