diff --git a/core/modules/node/src/Tests/NodeRevisionsTest.php b/core/modules/node/src/Tests/NodeRevisionsTest.php
index bfdd213..1db04a1 100644
--- a/core/modules/node/src/Tests/NodeRevisionsTest.php
+++ b/core/modules/node/src/Tests/NodeRevisionsTest.php
@@ -128,7 +128,7 @@ protected function setUp() {
/**
* Checks node revision related operations.
*/
- function testRevisions() {
+ public function testRevisions() {
$node_storage = $this->container->get('entity.manager')->getStorage('node');
$nodes = $this->nodes;
$logs = $this->revisionLogs;
@@ -160,9 +160,9 @@ function testRevisions() {
$json = $this->renderContextualLinks($ids, 'node/' . $node->id());
$this->verbose($json[$ids[0]]);
- $expected = '
Edit';
+ $expected = 'Edit';
$this->assertTrue(strstr($json[$ids[0]], $expected), 'The "Edit" contextual link is shown for the default revision.');
- $expected = 'Delete';
+ $expected = 'Delete';
$this->assertTrue(strstr($json[$ids[0]], $expected), 'The "Delete" contextual link is shown for the default revision.');
diff --git a/core/modules/system/src/Tests/Menu/MenuAccessTest.php b/core/modules/system/src/Tests/Menu/MenuAccessTest.php
index fff17e5..74396d2 100644
--- a/core/modules/system/src/Tests/Menu/MenuAccessTest.php
+++ b/core/modules/system/src/Tests/Menu/MenuAccessTest.php
@@ -38,7 +38,7 @@ public function testMenuBlockLinksAccessCheck() {
// Test that there's link rendered on the route.
$this->drupalGet('menu_test_access_check_session');
$this->assertLink('Test custom route access check');
- // Page still accessible but thre should not be menu link.
+ // Page still accessible but there should not be menu link.
$this->drupalGet('menu_test_access_check_session');
$this->assertResponse(200);
$this->assertNoLink('Test custom route access check');
@@ -56,13 +56,18 @@ public function testMenuBlockLinksAccessCheck() {
// Attempt to access a restricted local task.
$this->drupalGet('foo/asdf/c');
$this->assertResponse(403);
- $elements = $this->xpath('//ul[@class=:class]/li/a[@href=:href]', array(
- ':class' => 'tabs primary',
- ':href' => Url::fromRoute('menu_test.router_test1', ['bar' => 'asdf'])->toString(),
- ));
- $this->assertTrue(empty($elements), 'No tab linking to foo/asdf found');
- $this->assertNoLinkByHref('foo/asdf/b');
- $this->assertNoLinkByHref('foo/asdf/c');
+ $links = [
+ Url::fromRoute('menu_test.router_test1', ['bar' => 'asdf'])->toString(),
+ 'foo/asdf/b',
+ 'foo/asdf/c',
+ ];
+ foreach ($links as $link) {
+ $elements = $this->xpath('//ul[@class=:class]/li/a[@href=:href]', array(
+ ':class' => 'tabs primary',
+ ':href' => $link,
+ ));
+ $this->assertTrue(empty($elements), 'No tab linking to ' . $link . 'found');
+ }
}
}