more comment fixes
[civicrm-core.git] / tests / phpunit / Civi / API / Subscriber / DynamicFKAuthorizationTest.php
index 0a997e18b96dc6ddb46200d8779451052d6eaccc..e10579f5612407e00acad7c7ec33cee69213ec85 100644 (file)
@@ -114,7 +114,7 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
     $cases[] = array(
       'FakeFile',
       'create',
-      array('entity_table' => 'fake_widget', 'entity_id' => self::WIDGET_ID)
+      array('entity_table' => 'fake_widget', 'entity_id' => self::WIDGET_ID),
     );
     $cases[] = array('FakeFile', 'get', array('entity_table' => 'fake_widget'));
 
@@ -137,17 +137,27 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
       'FakeFile',
       'create',
       array('entity_table' => 'fake_forbidden', 'entity_id' => self::FORBIDDEN_ID),
-      '/Authorization failed/'
+      '/Authorization failed/',
     );
     $cases[] = array(
       'FakeFile',
       'get',
       array('entity_table' => 'fake_forbidden', 'entity_id' => self::FORBIDDEN_ID),
-      '/Authorization failed/'
+      '/Authorization failed/',
     );
 
-    $cases[] = array('FakeFile', 'create', array(), "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/");
-    $cases[] = array('FakeFile', 'get', array(), "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/");
+    $cases[] = array(
+      'FakeFile',
+      'create',
+      array(),
+      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/",
+    );
+    $cases[] = array(
+      'FakeFile',
+      'get',
+      array(),
+      "/Mandatory key\\(s\\) missing from params array: 'id' or 'entity_table/",
+    );
 
     $cases[] = array('FakeFile', 'create', array('entity_table' => 'unknown'), '/Unrecognized target entity/');
     $cases[] = array('FakeFile', 'get', array('entity_table' => 'unknown'), '/Unrecognized target entity/');
@@ -158,7 +168,7 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
   /**
    * @param $entity
    * @param $action
-   * @param $params
+   * @param array $params
    * @dataProvider okDataProvider
    */
   public function testOk($entity, $action, $params) {
@@ -177,7 +187,8 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
   /**
    * @param $entity
    * @param $action
-   * @param $params
+   * @param array $params
+   * @param $expectedError
    * @dataProvider badDataProvider
    */
   public function testBad($entity, $action, $params, $expectedError) {
@@ -193,4 +204,5 @@ class DynamicFKAuthorizationTest extends \CiviUnitTestCase {
     ), TRUE));
     $this->assertRegExp($expectedError, $result['error_message']);
   }
+
 }