public function TransactionAdminTest::doTestTransactorConfiguration in Transaction 8
Tests transactor configuration from the transaction type edit.
See also
\Drupal\transaction\Form\TransactionTypeEditForm
1 call to TransactionAdminTest::doTestTransactorConfiguration()
- TransactionAdminTest::testAdmin in tests/
src/ Functional/ TransactionAdminTest.php - Full admin test sequence.
File
- tests/
src/ Functional/ TransactionAdminTest.php, line 126
Class
- TransactionAdminTest
- Tests the transaction administration.
Namespace
Drupal\Tests\transaction\FunctionalCode
public function doTestTransactorConfiguration() {
$post = [
// Execution control: ask user.
'execution' => '3',
];
$this
->drupalPostForm('admin/config/workflow/transaction/edit/generic_workflow', $post, 'Save transaction type');
// Checks the transactor options.
$expected_plugin_configuration = [
'log_message' => 'field_log_message',
'last_transaction' => 'field_last_transaction',
'execution' => '3',
];
/** @var \Drupal\transaction\TransactionTypeInterface $transaction_type */
$transaction_type = TransactionType::load('generic_workflow');
/** @var \Drupal\transaction\TransactorPluginInterface $transactor_plugin */
$transactor_plugin = $transaction_type
->getPlugin();
// Check that the transactor has the expected configuration.
$this
->assertEquals($transactor_plugin
->getConfiguration(), $expected_plugin_configuration);
}