only in patch2: unchanged: --- a/core/modules/block/src/Tests/Views/DisplayBlockTest.php +++ b/core/modules/block/src/Tests/Views/DisplayBlockTest.php @@ -288,8 +288,13 @@ public function testBlockContextualLinks() { $response = $this->drupalPost('contextual/render', 'application/json', $post, array('query' => array('destination' => 'test-page'))); $this->assertResponse(200); $json = Json::decode($response); - $this->assertIdentical($json[$id], ''); - $this->assertIdentical($json[$cached_id], ''); + $this->setRawContent($json[$id]); + $result = $this->xpath('//ul/li/a[contains(@href, :block) and text()="Configure block"]', [':block' => "admin/structure/block/manage/" . $block->id()]); + $this->assertTrue($result, 'The contextual links are present.'); + $this->setRawContent($json[$cached_id]); + $result = $this->xpath('//ul/li/a[contains(@href, :cached_block) and text()="Configure block"]', [':cached_block' => "admin/structure/block/manage/" . $cached_block->id()]); + $this->assertTrue($result, 'The contextual links are present.'); + } }