summaryrefslogtreecommitdiffstats
path: root/tests/lib/appframework
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/appframework')
-rw-r--r--tests/lib/appframework/http/DispatcherTest.php5
-rw-r--r--tests/lib/appframework/http/ResponseTest.php4
-rw-r--r--tests/lib/appframework/middleware/MiddlewareDispatcherTest.php3
-rw-r--r--tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php11
-rw-r--r--tests/lib/appframework/routing/RoutingTest.php13
5 files changed, 33 insertions, 3 deletions
diff --git a/tests/lib/appframework/http/DispatcherTest.php b/tests/lib/appframework/http/DispatcherTest.php
index 6cf0da879ff..9841dcaa1f7 100644
--- a/tests/lib/appframework/http/DispatcherTest.php
+++ b/tests/lib/appframework/http/DispatcherTest.php
@@ -24,7 +24,6 @@
namespace OC\AppFramework\Http;
-use OC\AppFramework\Core\API;
use OC\AppFramework\Middleware\MiddlewareDispatcher;
use OCP\AppFramework\Http;
//require_once(__DIR__ . "/../classloader.php");
@@ -78,6 +77,10 @@ class DispatcherTest extends \PHPUnit_Framework_TestCase {
}
+ /**
+ * @param string $out
+ * @param string $httpHeaders
+ */
private function setMiddlewareExpections($out=null,
$httpHeaders=null, $responseHeaders=array(),
$ex=false, $catchEx=true) {
diff --git a/tests/lib/appframework/http/ResponseTest.php b/tests/lib/appframework/http/ResponseTest.php
index 1a38c38c1e7..4f21d77a170 100644
--- a/tests/lib/appframework/http/ResponseTest.php
+++ b/tests/lib/appframework/http/ResponseTest.php
@@ -25,8 +25,8 @@
namespace OC\AppFramework\Http;
-use OCP\AppFramework\Http\Response,
- OCP\AppFramework\Http;
+use OCP\AppFramework\Http\Response;
+use OCP\AppFramework\Http;
class ResponseTest extends \PHPUnit_Framework_TestCase {
diff --git a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
index 95d42e4eb8e..f16b14150c3 100644
--- a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
+++ b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php
@@ -50,6 +50,9 @@ class TestMiddleware extends Middleware {
private $beforeControllerThrowsEx;
+ /**
+ * @param boolean $beforeControllerThrowsEx
+ */
public function __construct($beforeControllerThrowsEx) {
self::$beforeControllerCalled = 0;
self::$afterControllerCalled = 0;
diff --git a/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php b/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
index dae6135dc54..63c48a62829 100644
--- a/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
+++ b/tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
@@ -58,6 +58,9 @@ class SecurityMiddlewareTest extends \PHPUnit_Framework_TestCase {
}
+ /**
+ * @param string $method
+ */
private function checkNavEntry($method){
$api = $this->getAPI();
@@ -79,6 +82,10 @@ class SecurityMiddlewareTest extends \PHPUnit_Framework_TestCase {
}
+ /**
+ * @param string $method
+ * @param string $test
+ */
private function ajaxExceptionStatus($method, $test, $status) {
$api = $this->getAPI();
$api->expects($this->any())
@@ -183,6 +190,10 @@ class SecurityMiddlewareTest extends \PHPUnit_Framework_TestCase {
}
+ /**
+ * @param string $method
+ * @param string $expects
+ */
private function securityCheck($method, $expects, $shouldFail=false){
$api = $this->getAPI();
$api->expects($this->once())
diff --git a/tests/lib/appframework/routing/RoutingTest.php b/tests/lib/appframework/routing/RoutingTest.php
index a7aa922db12..d0244cf2511 100644
--- a/tests/lib/appframework/routing/RoutingTest.php
+++ b/tests/lib/appframework/routing/RoutingTest.php
@@ -78,6 +78,13 @@ class RouteConfigTest extends \PHPUnit_Framework_TestCase
$this->assertResource($routes, 'admin_accounts', '/admin/accounts', 'AdminAccountsController', 'adminAccountId');
}
+ /**
+ * @param string $name
+ * @param string $verb
+ * @param string $url
+ * @param string $controllerName
+ * @param string $actionName
+ */
private function assertSimpleRoute($routes, $name, $verb, $url, $controllerName, $actionName)
{
// route mocks
@@ -100,6 +107,12 @@ class RouteConfigTest extends \PHPUnit_Framework_TestCase
$config->register();
}
+ /**
+ * @param string $resourceName
+ * @param string $url
+ * @param string $controllerName
+ * @param string $paramName
+ */
private function assertResource($yaml, $resourceName, $url, $controllerName, $paramName)
{
// router mock