Skip to content
Snippets Groups Projects
Commit cf8c025b authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2080401 by Bladedu, mrsinguyen, lokapujya, pfrenssen: Remove Unused...

Issue #2080401 by Bladedu, mrsinguyen, lokapujya, pfrenssen: Remove Unused local variable  from /core/modules/simpletest/lib/Drupal/simpletest/Tests/SimpleTestTest.php.
parent 3b39053d
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -186,8 +186,8 @@ function stubTest() {
$this->pass(t('Test ID is @id.', array('@id' => $this->testId)));
// Generates a warning.
$i = 1 / 0;
// Call trigger_error() without the required argument to trigger an E_WARNING.
trigger_error();
// Call an assert function specific to that class.
$this->assertNothing();
......@@ -217,8 +217,9 @@ function confirmStubTestResults() {
$this->assertAssertion(t('Created permissions: @perms', array('@perms' => $this->valid_permission)), 'Role', 'Pass', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()');
$this->assertAssertion(t('Invalid permission %permission.', array('%permission' => $this->invalid_permission)), 'Role', 'Fail', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()');
// Check that a warning is caught by simpletest.
$this->assertAssertion('Division by zero', 'Warning', 'Fail', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()');
// Check that a warning is caught by simpletest. The exact error message
// differs between PHP versions so only the function name is checked.
$this->assertAssertion('trigger_error()', 'Warning', 'Fail', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()');
// Check that the backtracing code works for specific assert function.
$this->assertAssertion('This is nothing.', 'Other', 'Pass', 'SimpleTestTest.php', 'Drupal\simpletest\Tests\SimpleTestTest->stubTest()');
......
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