Skip to content
Snippets Groups Projects
Commit ad136b8d authored by Liam Morland's avatar Liam Morland
Browse files

Issue #3426100: Ensure string arguments are strings in testing

parent 691308d3
No related branches found
No related tags found
No related merge requests found
......@@ -55,7 +55,7 @@ class FillPdfFormFormTest extends FillPdfUploadTestBase {
$this->assertSession()->fieldValueEquals('default_entity_type', $type);
// Check the default entity ID field is present but empty.
$this->assertSession()->fieldValueEquals('default_entity_id', NULL);
$this->assertSession()->fieldValueEquals('default_entity_id', '');
if ($count == 0) {
$options = $this->assertSession()->selectExists('default_entity_id')->findAll('xpath', 'option');
......
......@@ -254,7 +254,7 @@ class FillPdfSettingsFormTest extends BrowserTestBase {
$this->assertSession()->pageTextContains('The configuration options have been saved.');
// So the new values should be submitted *and* saved this time, except for
// the unrelated 'fillpdf_service_api_key' which should be dismissed.
$expected = ['fillpdf_service_api_key' => NULL] + $edit;
$expected = ['fillpdf_service_api_key' => ''] + $edit;
foreach ($expected as $field => $value) {
$this->assertSession()->fieldValueEquals($field, $value);
$config_name = $field === 'example_setting' ? 'fillpdf_test.settings' : 'fillpdf.settings';
......
......@@ -59,7 +59,7 @@ class PdfWebformPopulationTest extends FillPdfTestBase {
$contact_form = Webform::load('fillpdf_contact');
$contact_form_test_route = Url::fromRoute('entity.webform.test_form', ['webform' => $contact_form->id()]);
$this->drupalGet($contact_form_test_route);
$this->submitForm([], $this->t('Send message'));
$this->submitForm([], (string) $this->t('Send message'));
// Load the submission.
$this->testSubmission = WebformSubmission::load($this->getLastSubmissionId($contact_form));
......
......@@ -64,7 +64,7 @@ trait TestFillPdfTrait {
'local_service_endpoint' => $localServerEndpoint ?: 'http://127.0.0.1:8085',
];
$this->drupalGet('admin/config/media/fillpdf');
$this->submitForm($edit, t('Save configuration'));
$this->submitForm($edit, (string) t('Save configuration'));
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment