@@ -67,14 +67,11 @@ function optionsProvider() {
67
67
);
68
68
}
69
69
70
- /**
71
- * @dataProvider optionsProvider
72
- */
73
- public function testStorageMountOptions ($ inputUri , $ baseUri ) {
70
+ private function getTestStorage ($ uri ) {
74
71
$ certificateManager = \OC ::$ server ->getCertificateManager ();
75
- $ storage = new TestSharingExternalStorage (
72
+ return new TestSharingExternalStorage (
76
73
array (
77
- 'remote ' => $ inputUri ,
74
+ 'remote ' => $ uri ,
78
75
'owner ' => 'testOwner ' ,
79
76
'mountpoint ' => 'remoteshare ' ,
80
77
'token ' => 'abcdef ' ,
@@ -83,8 +80,20 @@ public function testStorageMountOptions($inputUri, $baseUri) {
83
80
'certificateManager ' => $ certificateManager
84
81
)
85
82
);
83
+ }
84
+
85
+ /**
86
+ * @dataProvider optionsProvider
87
+ */
88
+ public function testStorageMountOptions ($ inputUri , $ baseUri ) {
89
+ $ storage = $ this ->getTestStorage ($ inputUri );
86
90
$ this ->assertEquals ($ baseUri , $ storage ->getBaseUri ());
87
91
}
92
+
93
+ public function testIfTestReturnsTheValue () {
94
+ $ result = $ this ->getTestStorage ('https://remoteserver ' )->test ();
95
+ $ this ->assertSame (true , $ result );
96
+ }
88
97
}
89
98
90
99
/**
@@ -95,4 +104,11 @@ class TestSharingExternalStorage extends \OCA\Files_Sharing\External\Storage {
95
104
public function getBaseUri () {
96
105
return $ this ->createBaseUri ();
97
106
}
107
+
108
+ public function stat ($ path ) {
109
+ if ($ path === '' ) {
110
+ return true ;
111
+ }
112
+ return parent ::stat ($ path );
113
+ }
98
114
}
0 commit comments