Updated all the contrib modules to their latest versions.
[yaffs-website] / web / modules / contrib / token / tests / src / Kernel / BookTest.php
index 67a13eecd65f9dd83fdebbbcefbcce88c71964fd..215fdb54e27f352d81fbc939c7cf4fd32b6308aa 100644 (file)
@@ -27,9 +27,9 @@ class BookTest extends KernelTestBase {
 
     $this->installEntitySchema('user');
     $this->installEntitySchema('node');
-    $this->installSchema('book', array('book'));
-    $this->installSchema('node', array('node_access'));
-    $this->installConfig(array('node', 'book', 'field'));
+    $this->installSchema('book', ['book']);
+    $this->installSchema('node', ['node_access']);
+    $this->installConfig(['node', 'book', 'field']);
   }
 
   function testBookTokens() {
@@ -63,12 +63,12 @@ class BookTest extends KernelTestBase {
       'book:root' => $book_title,
       'book:root:nid' => $book->id(),
       'book:root:title' => $book_title,
-      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], array('absolute' => TRUE))->toString(),
+      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], ['absolute' => TRUE])->toString(),
       'book:root:content-type' => 'Book page',
       'book:parent' => null,
       'book:parents' => null,
     ];
-    $this->assertTokens('node', array('node' => $book), $tokens);
+    $this->assertTokens('node', ['node' => $book], $tokens);
 
     $tokens = [
       'nid' => $page1->id(),
@@ -77,15 +77,15 @@ class BookTest extends KernelTestBase {
       'book:root' => $book_title,
       'book:root:nid' => $book->id(),
       'book:root:title' => $book_title,
-      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], array('absolute' => TRUE))->toString(),
+      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], ['absolute' => TRUE])->toString(),
       'book:root:content-type' => 'Book page',
       'book:parent:nid' => $book->id(),
       'book:parent:title' => $book_title,
-      'book:parent:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], array('absolute' => TRUE))->toString(),
+      'book:parent:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], ['absolute' => TRUE])->toString(),
       'book:parents:count' => 1,
       'book:parents:join:/' => $book_title,
     ];
-    $this->assertTokens('node', array('node' => $page1), $tokens);
+    $this->assertTokens('node', ['node' => $page1], $tokens);
 
     $tokens = [
       'nid' => $page2->id(),
@@ -94,14 +94,15 @@ class BookTest extends KernelTestBase {
       'book:root' => $book_title,
       'book:root:nid' => $book->id(),
       'book:root:title' => $book_title,
-      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], array('absolute' => TRUE))->toString(),
+      'book:root:url' => Url::fromRoute('entity.node.canonical', ['node' => $book->id()], ['absolute' => TRUE])->toString(),
       'book:root:content-type' => 'Book page',
       'book:parent:nid' => $page1->id(),
       'book:parent:title' => $page1->getTitle(),
-      'book:parent:url' => Url::fromRoute('entity.node.canonical', ['node' => $page1->id()], array('absolute' => TRUE))->toString(),
+      'book:parent:url' => Url::fromRoute('entity.node.canonical', ['node' => $page1->id()], ['absolute' => TRUE])->toString(),
       'book:parents:count' => 2,
       'book:parents:join:/' => $book_title . '/' . $page1->getTitle(),
     ];
-    $this->assertTokens('node', array('node' => $page2), $tokens);
+    $this->assertTokens('node', ['node' => $page2], $tokens);
   }
+
 }