only in patch2: unchanged: --- a/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php +++ b/core/modules/simpletest/src/Tests/SimpleTestBrowserTest.php @@ -33,7 +33,7 @@ public function testInternalBrowser() { // Retrieve the test page and check its title and headers. $this->drupalGet('test-page'); $this->assertTrue($this->drupalGetHeader('Date'), 'An HTTP header was received.'); - $this->assertTitle(t('Test page | @site-name', [ + $this->assertSession()->titleEquals(t('Test page | @site-name', [ '@site-name' => $this->config('system.site')->get('name'), ])); $this->assertNoTitle('Foo'); only in patch2: unchanged: --- a/core/modules/system/src/Tests/Menu/AssertBreadcrumbTrait.php +++ b/core/modules/system/src/Tests/Menu/AssertBreadcrumbTrait.php @@ -46,7 +46,7 @@ protected function assertBreadcrumb($goto, array $trail, $page_title = NULL, arr // Additionally assert page title, if given. if (isset($page_title)) { - $this->assertTitle(strtr('@title | Drupal', ['@title' => $page_title])); + $this->assertSession()->titleEquals(strtr('@title | Drupal', ['@title' => $page_title])); } // Additionally assert active trail in a menu tree output, if given. only in patch2: unchanged: --- a/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/RouteProviderTest.php @@ -84,13 +84,13 @@ public function testHtmlRoutes() { $entity->save(); $this->setRawContent($this->httpKernelHandle($entity->toUrl()->toString())); - $this->assertTitle('Test title | '); + $this->assertSession()->titleEquals('Test title | '); $this->setRawContent($this->httpKernelHandle($entity->toUrl('edit-form')->toString())); - $this->assertTitle('Edit Test title | '); + $this->assertSession()->titleEquals('Edit Test title | '); $this->setRawContent($this->httpKernelHandle($entity->toUrl('delete-form')->toString())); - $this->assertTitle('Are you sure you want to delete the test entity - data table Test title? | '); + $this->assertSession()->titleEquals('Are you sure you want to delete the test entity - data table Test title? | '); } /** @@ -127,13 +127,13 @@ public function testAdminHtmlRoutes() { $entity->save(); $this->setRawContent($this->httpKernelHandle($entity->toUrl()->toString())); - $this->assertTitle('Test title | '); + $this->assertSession()->titleEquals('Test title | '); $this->setRawContent($this->httpKernelHandle($entity->toUrl('edit-form')->toString())); - $this->assertTitle('Edit Test title | '); + $this->assertSession()->titleEquals('Edit Test title | '); $this->setRawContent($this->httpKernelHandle($entity->toUrl('delete-form')->toString())); - $this->assertTitle('Are you sure you want to delete the test entity - admin routes Test title? | '); + $this->assertSession()->titleEquals('Are you sure you want to delete the test entity - admin routes Test title? | '); } }