$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'));
'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/');
/**
* @param $entity
* @param $action
- * @param $params
+ * @param array $params
* @dataProvider okDataProvider
*/
public function testOk($entity, $action, $params) {
/**
* @param $entity
* @param $action
- * @param $params
+ * @param array $params
+ * @param $expectedError
* @dataProvider badDataProvider
*/
public function testBad($entity, $action, $params, $expectedError) {
), TRUE));
$this->assertRegExp($expectedError, $result['error_message']);
}
+
}