More updates to stop using dev or alpha or beta versions.
[yaffs-website] / web / core / tests / Drupal / Tests / Core / Access / AccessResultTest.php
index 647da61255a8ab58964741c955fcf90ea4e151b7..60a17a0fb68b7564a15a85f107a9173c5b275681 100644 (file)
@@ -128,6 +128,9 @@ class AccessResultTest extends UnitTestCase {
     $reason = $this->getRandomGenerator()->string();
     $b = AccessResult::forbidden($reason);
     $verify($b, $reason);
+
+    $b = AccessResult::forbiddenIf(TRUE, $reason);
+    $verify($b, $reason);
   }
 
   /**
@@ -617,7 +620,6 @@ class AccessResultTest extends UnitTestCase {
       [$allowed_un, 'OR', $neutral_cf, FALSE, NULL],
       [$allowed_un, 'OR', $neutral_un, FALSE, NULL],
 
-
       // Forbidden (ct) OR allowed (ct,cf,un).
       [$forbidden_ct, 'OR', $allowed_ct, TRUE, TRUE],
       [$forbidden_ct, 'OR', $allowed_cf, TRUE, TRUE],
@@ -657,7 +659,6 @@ class AccessResultTest extends UnitTestCase {
       [$forbidden_un, 'OR', $forbidden_cf, FALSE, NULL],
       [$forbidden_un, 'OR', $forbidden_un, FALSE, NULL],
 
-
       // Neutral (ct) OR allowed (ct,cf,un).
       [$neutral_ct, 'OR', $allowed_ct, TRUE, TRUE],
       [$neutral_ct, 'OR', $allowed_cf, TRUE, FALSE],
@@ -697,9 +698,6 @@ class AccessResultTest extends UnitTestCase {
       [$neutral_un, 'OR', $forbidden_cf, FALSE, NULL],
       [$neutral_un, 'OR', $forbidden_un, FALSE, NULL],
 
-
-
-
       // Allowed (ct) AND allowed (ct,cf,un).
       [$allowed_ct, 'AND', $allowed_ct, TRUE, TRUE],
       [$allowed_ct, 'AND', $allowed_cf, TRUE, FALSE],
@@ -739,7 +737,6 @@ class AccessResultTest extends UnitTestCase {
       [$allowed_un, 'AND', $neutral_cf, FALSE, NULL],
       [$allowed_un, 'AND', $neutral_un, FALSE, NULL],
 
-
       // Forbidden (ct) AND allowed (ct,cf,un).
       [$forbidden_ct, 'AND', $allowed_ct, TRUE, TRUE],
       [$forbidden_ct, 'AND', $allowed_cf, TRUE, TRUE],
@@ -779,7 +776,6 @@ class AccessResultTest extends UnitTestCase {
       [$forbidden_un, 'AND', $forbidden_cf, FALSE, NULL],
       [$forbidden_un, 'AND', $forbidden_un, FALSE, NULL],
 
-
       // Neutral (ct) AND allowed (ct,cf,un).
       [$neutral_ct, 'AND', $allowed_ct, TRUE, TRUE],
       [$neutral_ct, 'AND', $allowed_cf, TRUE, TRUE],
@@ -859,7 +855,7 @@ class AccessResultTest extends UnitTestCase {
    * tested in ::testOrIf().
    */
   public function testOrIfCacheabilityMerging() {
-    $merge_both_directions = function(AccessResult $a, AccessResult $b) {
+    $merge_both_directions = function (AccessResult $a, AccessResult $b) {
       // A globally cacheable access result.
       $a->setCacheMaxAge(3600);
       // Another access result that is cacheable per permissions.