Security update for permissions_by_term
[yaffs-website] / vendor / drupal / drupal-driver / spec / Drupal / Driver / BlackboxDriverSpec.php
diff --git a/vendor/drupal/drupal-driver/spec/Drupal/Driver/BlackboxDriverSpec.php b/vendor/drupal/drupal-driver/spec/Drupal/Driver/BlackboxDriverSpec.php
new file mode 100644 (file)
index 0000000..13b30ec
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+
+namespace spec\Drupal\Driver;
+
+use PhpSpec\ObjectBehavior;
+use Prophecy\Argument;
+
+class BlackboxDriverSpec extends ObjectBehavior
+{
+    function it_is_initializable()
+    {
+        $this->shouldHaveType('Drupal\Driver\BlackboxDriver');
+    }
+
+    function it_is_always_bootstrapped()
+    {
+        $this->isBootStrapped()->shouldReturn(TRUE);
+    }
+
+    function it_should_not_allow_api_methods()
+    {
+        $user = $node = $term = new \stdClass();
+        $this->shouldThrow('Drupal\Driver\Exception\UnsupportedDriverActionException')->duringUserCreate($user);
+        $this->shouldThrow('Drupal\Driver\Exception\UnsupportedDriverActionException')->duringCreateNode($node);
+        $this->shouldThrow('Drupal\Driver\Exception\UnsupportedDriverActionException')->duringCreateTerm($term);
+    }
+
+    function it_should_not_have_a_random_generator()
+    {
+        $this->shouldThrow('Drupal\Driver\Exception\UnsupportedDriverActionException')->duringGetRandom();
+    }
+}