WebformHandlerInvokeAlterHookTest.php in Webform 6.x
File
tests/src/Functional/Handler/WebformHandlerInvokeAlterHookTest.php
View source
<?php
namespace Drupal\Tests\webform\Functional\Handler;
use Drupal\Tests\webform\Functional\WebformBrowserTestBase;
class WebformHandlerInvokeAlterHookTest extends WebformBrowserTestBase {
public static $modules = [
'webform',
'webform_test_handler_invoke_alter',
];
public function testWebformHandlerInvokeAlterHook() {
$this
->drupalGet('/webform/contact');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::pre_create"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_pre_create_alter() for "contact:email_confirmation"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::pre_create"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_pre_create_alter() for "contact:email_notification"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::alter_elements"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::alter_elements"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::post_create"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::post_create"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::override_settings"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::override_settings"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::prepare_form"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::prepare_form"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::access_element"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::access_element"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::alter_element"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::alter_element"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_confirmation::alter_form"');
$this
->assertRaw('Invoking hook_webform_handler_invoke_alter() for "contact:email_notification::alter_form"');
}
}