X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fmodules%2Fcontrib%2Ftoken%2Ftests%2Fsrc%2FKernel%2FBookTest.php;h=215fdb54e27f352d81fbc939c7cf4fd32b6308aa;hp=67a13eecd65f9dd83fdebbbcefbcce88c71964fd;hb=059867c3f96750652c80f39e44c442a58c2549ee;hpb=f8fc16ae6b862bef59baaad5d051dd37b7ff11b2 diff --git a/web/modules/contrib/token/tests/src/Kernel/BookTest.php b/web/modules/contrib/token/tests/src/Kernel/BookTest.php index 67a13eecd..215fdb54e 100644 --- a/web/modules/contrib/token/tests/src/Kernel/BookTest.php +++ b/web/modules/contrib/token/tests/src/Kernel/BookTest.php @@ -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); } + }