Mercurial > hg > cmmr2012-drupal-site
diff core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | a9cd425dd02b |
children |
line wrap: on
line diff
--- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php Thu Feb 28 13:11:55 2019 +0000 +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php Thu May 09 15:34:47 2019 +0100 @@ -4,12 +4,12 @@ use Drupal\Core\Url; use Drupal\simpletest\WebTestBase; -use Drupal\Tests\simpletest\Functional\ThroughUITest; /** - * Tests the Simpletest UI internal browser. + * Tests the WebTestBase internal browser. * * @group simpletest + * @group WebTestBase */ class SimpleTestBrowserTest extends WebTestBase { @@ -58,7 +58,7 @@ // Test the maximum redirection option. $this->maximumRedirects = 1; $edit = [ - 'name' => $user->getUsername(), + 'name' => $user->getAccountName(), 'pass' => $user->pass_raw, ]; $this->drupalPostForm('user/login', $edit, t('Log in'), [ @@ -116,33 +116,4 @@ $this->assertResponse(403, 'Requesting https.php with a normal User-Agent fails.'); } - /** - * Tests that PHPUnit and KernelTestBase tests work through the UI. - */ - public function testTestingThroughUI() { - $this->drupalGet('admin/config/development/testing'); - $this->assertTrue(strpos($this->drupalSettings['simpleTest']['images'][0], 'core/misc/menu-collapsed.png') > 0, 'drupalSettings contains a link to core/misc/menu-collapsed.png.'); - // We can not test WebTestBase tests here since they require a valid .htkey - // to be created. However this scenario is covered by the testception of - // \Drupal\simpletest\Tests\SimpleTestTest. - - $tests = [ - // A KernelTestBase test. - 'Drupal\KernelTests\KernelTestBaseTest', - // A PHPUnit unit test. - 'Drupal\Tests\action\Unit\Menu\ActionLocalTasksTest', - // A PHPUnit functional test. - ThroughUITest::class, - ]; - - foreach ($tests as $test) { - $this->drupalGet('admin/config/development/testing'); - $edit = [ - "tests[$test]" => TRUE, - ]; - $this->drupalPostForm(NULL, $edit, t('Run tests')); - $this->assertText('0 fails, 0 exceptions'); - } - } - }