aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2020-04-10 16:51:06 +0200
commit1584c9ae9c23d2a7915750ef9203cba0bcebf766 (patch)
tree568db931f631afd6e96772cf2b3ac539c989ec42 /tests/lib/AppFramework
parenta7c8d26d31cb1cf69e0e060c53622e545fcfbbb3 (diff)
downloadnextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.tar.gz
nextcloud-server-1584c9ae9c23d2a7915750ef9203cba0bcebf766.zip
Add visibility to all methods and position of static keyword
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/AppFramework')
-rw-r--r--tests/lib/AppFramework/Http/RequestStream.php14
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php2
-rw-r--r--tests/lib/AppFramework/Http/ResponseTest.php6
3 files changed, 11 insertions, 11 deletions
diff --git a/tests/lib/AppFramework/Http/RequestStream.php b/tests/lib/AppFramework/Http/RequestStream.php
index 1dcfbce46d1..3868ed16505 100644
--- a/tests/lib/AppFramework/Http/RequestStream.php
+++ b/tests/lib/AppFramework/Http/RequestStream.php
@@ -10,7 +10,7 @@ class RequestStream {
protected $position;
protected $varname;
- function stream_open($path, $mode, $options, &$opened_path) {
+ public function stream_open($path, $mode, $options, &$opened_path) {
$url = parse_url($path);
$this->varname = $url["host"];
$this->position = 0;
@@ -18,13 +18,13 @@ class RequestStream {
return true;
}
- function stream_read($count) {
+ public function stream_read($count) {
$ret = substr($GLOBALS[$this->varname], $this->position, $count);
$this->position += strlen($ret);
return $ret;
}
- function stream_write($data) {
+ public function stream_write($data) {
$left = substr($GLOBALS[$this->varname], 0, $this->position);
$right = substr($GLOBALS[$this->varname], $this->position + strlen($data));
$GLOBALS[$this->varname] = $left . $data . $right;
@@ -32,15 +32,15 @@ class RequestStream {
return strlen($data);
}
- function stream_tell() {
+ public function stream_tell() {
return $this->position;
}
- function stream_eof() {
+ public function stream_eof() {
return $this->position >= strlen($GLOBALS[$this->varname]);
}
- function stream_seek($offset, $whence) {
+ public function stream_seek($offset, $whence) {
switch ($whence) {
case SEEK_SET:
if ($offset < strlen($GLOBALS[$this->varname]) && $offset >= 0) {
@@ -96,7 +96,7 @@ class RequestStream {
//return false;
}
- function stream_metadata($path, $option, $var) {
+ public function stream_metadata($path, $option, $var) {
if ($option == STREAM_META_TOUCH) {
$url = parse_url($path);
$varname = $url["host"];
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 2004bd2e6b5..a8e2f2248c6 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -902,7 +902,7 @@ class RequestTest extends \Test\TestCase {
/**
* @return array
*/
- function userAgentProvider() {
+ public function userAgentProvider() {
return [
[
'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)',
diff --git a/tests/lib/AppFramework/Http/ResponseTest.php b/tests/lib/AppFramework/Http/ResponseTest.php
index 3978326d130..e6f88b6a6e9 100644
--- a/tests/lib/AppFramework/Http/ResponseTest.php
+++ b/tests/lib/AppFramework/Http/ResponseTest.php
@@ -118,7 +118,7 @@ class ResponseTest extends \Test\TestCase {
}
- function testSetCookies() {
+ public function testSetCookies() {
$expected = [
'foo' => [
'value' => 'bar',
@@ -137,7 +137,7 @@ class ResponseTest extends \Test\TestCase {
}
- function testInvalidateCookie() {
+ public function testInvalidateCookie() {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->invalidateCookie('foo');
$expected = [
@@ -153,7 +153,7 @@ class ResponseTest extends \Test\TestCase {
}
- function testInvalidateCookies() {
+ public function testInvalidateCookies() {
$this->childResponse->addCookie('foo', 'bar');
$this->childResponse->addCookie('bar', 'foo');
$expected = [