diff options
author | Thomas Tanghus <thomas@tanghus.net> | 2013-10-05 16:59:06 +0200 |
---|---|---|
committer | Thomas Tanghus <thomas@tanghus.net> | 2013-10-05 16:59:06 +0200 |
commit | c85621a8971a99a6f811c470f50d9b0e89f957da (patch) | |
tree | b1308a864cdf5687da9bd16433a31b5087930aea /tests/lib | |
parent | 485bb100b3993af46f6c6be66bd79c563dbffaed (diff) | |
download | nextcloud-server-c85621a8971a99a6f811c470f50d9b0e89f957da.tar.gz nextcloud-server-c85621a8971a99a6f811c470f50d9b0e89f957da.zip |
Make abstract Middleware class public
It doesn't make sense for subclasses to have to implement
all methods.
Diffstat (limited to 'tests/lib')
-rw-r--r-- | tests/lib/appframework/middleware/MiddlewareDispatcherTest.php | 8 | ||||
-rw-r--r-- | tests/lib/appframework/middleware/MiddlewareTest.php | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php index 43727846dcf..dd85a9ad52f 100644 --- a/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php +++ b/tests/lib/appframework/middleware/MiddlewareDispatcherTest.php @@ -25,8 +25,8 @@ namespace OC\AppFramework; use OC\AppFramework\Http\Request; -use OC\AppFramework\Middleware\Middleware; use OC\AppFramework\Middleware\MiddlewareDispatcher; +use OCP\AppFramework\Middleware; use OCP\AppFramework\Http\Response; @@ -142,12 +142,12 @@ class MiddlewareDispatcherTest extends \PHPUnit_Framework_TestCase { public function testAfterExceptionShouldReturnResponseOfMiddleware(){ $response = new Response(); - $m1 = $this->getMock('\OC\AppFramework\Middleware\Middleware', + $m1 = $this->getMock('\OCP\AppFramework\Middleware', array('afterException', 'beforeController')); $m1->expects($this->never()) ->method('afterException'); - $m2 = $this->getMock('OC\AppFramework\Middleware\Middleware', + $m2 = $this->getMock('OCP\AppFramework\Middleware', array('afterException', 'beforeController')); $m2->expects($this->once()) ->method('afterException') @@ -267,7 +267,7 @@ class MiddlewareDispatcherTest extends \PHPUnit_Framework_TestCase { public function testExceptionShouldRunAfterExceptionOfOnlyPreviouslyExecutedMiddlewares(){ $m1 = $this->getMiddleware(); $m2 = $this->getMiddleware(true); - $m3 = $this->getMock('\OC\AppFramework\Middleware\Middleware'); + $m3 = $this->getMock('\OCP\AppFramework\Middleware'); $m3->expects($this->never()) ->method('afterException'); $m3->expects($this->never()) diff --git a/tests/lib/appframework/middleware/MiddlewareTest.php b/tests/lib/appframework/middleware/MiddlewareTest.php index 5e2930ac6a3..d0be7f7ca74 100644 --- a/tests/lib/appframework/middleware/MiddlewareTest.php +++ b/tests/lib/appframework/middleware/MiddlewareTest.php @@ -25,7 +25,7 @@ namespace OC\AppFramework; use OC\AppFramework\Http\Request; -use OC\AppFramework\Middleware\Middleware; +use OCP\AppFramework\Middleware; class ChildMiddleware extends Middleware {}; |