diff options
Diffstat (limited to 'tests/lib/AppFramework/Http/RequestTest.php')
-rw-r--r-- | tests/lib/AppFramework/Http/RequestTest.php | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php index 7ca09cf33da..000a05f7913 100644 --- a/tests/lib/AppFramework/Http/RequestTest.php +++ b/tests/lib/AppFramework/Http/RequestTest.php @@ -103,10 +103,10 @@ class RequestTest extends \Test\TestCase { } - /** - * @expectedException \RuntimeException - */ + public function testImmutableArrayAccess() { + $this->expectException(\RuntimeException::class); + $vars = array( 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'), 'method' => 'GET' @@ -123,10 +123,10 @@ class RequestTest extends \Test\TestCase { $request['nickname'] = 'Janey'; } - /** - * @expectedException \RuntimeException - */ + public function testImmutableMagicAccess() { + $this->expectException(\RuntimeException::class); + $vars = array( 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'), 'method' => 'GET' @@ -143,10 +143,10 @@ class RequestTest extends \Test\TestCase { $request->{'nickname'} = 'Janey'; } - /** - * @expectedException \LogicException - */ + public function testGetTheMethodRight() { + $this->expectException(\LogicException::class); + $vars = array( 'get' => array('name' => 'John Q. Public', 'nickname' => 'Joey'), 'method' => 'GET', @@ -1246,11 +1246,11 @@ class RequestTest extends \Test\TestCase { $this->assertSame('www.owncloud.org', self::invokePrivate($request, 'getOverwriteHost')); } - /** - * @expectedException \Exception - * @expectedExceptionMessage The requested uri(/foo.php) cannot be processed by the script '/var/www/index.php') - */ + public function testGetPathInfoNotProcessible() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); + $request = new Request( [ 'server' => [ @@ -1267,11 +1267,11 @@ class RequestTest extends \Test\TestCase { $request->getPathInfo(); } - /** - * @expectedException \Exception - * @expectedExceptionMessage The requested uri(/foo.php) cannot be processed by the script '/var/www/index.php') - */ + public function testGetRawPathInfoNotProcessible() { + $this->expectException(\Exception::class); + $this->expectExceptionMessage('The requested uri(/foo.php) cannot be processed by the script \'/var/www/index.php\')'); + $request = new Request( [ 'server' => [ |