@@ -48,7 +48,7 @@ protected function setUp(): void {
4848 );
4949 }
5050
51- public function cloudIdProvider () {
51+ public function cloudIdProvider (): array {
5252 return [
53535454 [
'[email protected] /cloud ' ,
'test ' ,
'example.com/cloud ' ,
'[email protected] /cloud ' ],
@@ -60,12 +60,8 @@ public function cloudIdProvider() {
6060
6161 /**
6262 * @dataProvider cloudIdProvider
63- *
64- * @param string $cloudId
65- * @param string $user
66- * @param string $remote
6763 */
68- public function testResolveCloudId ($ cloudId , $ user , $ remote , $ cleanId ) {
64+ public function testResolveCloudId (string $ cloudId , string $ user , string $ noProtocolRemote , string $ cleanId ): void {
6965 $ displayName = 'Ample Ex ' ;
7066
7167 $ this ->contactsManager ->expects ($ this ->any ())
@@ -81,12 +77,12 @@ public function testResolveCloudId($cloudId, $user, $remote, $cleanId) {
8177 $ cloudId = $ this ->cloudIdManager ->resolveCloudId ($ cloudId );
8278
8379 $ this ->assertEquals ($ user , $ cloudId ->getUser ());
84- $ this ->assertEquals ($ remote , $ cloudId ->getRemote ());
80+ $ this ->assertEquals (' https:// ' . $ noProtocolRemote , $ cloudId ->getRemote ());
8581 $ this ->assertEquals ($ cleanId , $ cloudId ->getId ());
86- $ this ->assertEquals ($ displayName . '@ ' . $ remote , $ cloudId ->getDisplayId ());
82+ $ this ->assertEquals ($ displayName . '@ ' . $ noProtocolRemote , $ cloudId ->getDisplayId ());
8783 }
8884
89- public function invalidCloudIdProvider () {
85+ public function invalidCloudIdProvider (): array {
9086 return [
9187 ['example.com ' ],
9288@@ -100,7 +96,7 @@ public function invalidCloudIdProvider() {
10096 * @param string $cloudId
10197 *
10298 */
103- public function testInvalidCloudId ($ cloudId ) {
99+ public function testInvalidCloudId (string $ cloudId ): void {
104100 $ this ->expectException (\InvalidArgumentException::class);
105101
106102 $ this ->contactsManager ->expects ($ this ->never ())
@@ -111,10 +107,10 @@ public function testInvalidCloudId($cloudId) {
111107
112108 public function getCloudIdProvider (): array {
113109 return [
114- [
'test ' ,
'example.com ' ,
'[email protected] ' ],
110+ [
'test ' ,
'example.com ' ,
'[email protected] ' , null , ' https://example.com ' , ' https://example.com ' ],
115111 [
'test ' ,
'http://example.com ' ,
'test@http://example.com ' ,
'[email protected] ' ],
116112 [
'test ' ,
null ,
'test@http://example.com ' ,
'[email protected] ' ,
'http://example.com ' ,
'http://example.com ' ],
117- [
'[email protected] ' ,
'example.com ' ,
'[email protected] @example.com ' ],
113+ [
'[email protected] ' ,
'example.com ' ,
'[email protected] @example.com ' , null , ' https://example.com ' , ' https://example.com ' ],
118114 [
'[email protected] ' ,
'https://example.com ' ,
'[email protected] @example.com ' ],
119115 [
'[email protected] ' ,
null ,
'[email protected] @example.com ' ,
null ,
'https://example.com ' ,
'https://example.com ' ],
120116 [
'[email protected] ' ,
'https://example.com/index.php/s/shareToken ' ,
'[email protected] @example.com ' ,
null ,
'https://example.com ' ,
'https://example.com ' ],
@@ -123,10 +119,6 @@ public function getCloudIdProvider(): array {
123119
124120 /**
125121 * @dataProvider getCloudIdProvider
126- *
127- * @param string $user
128- * @param null|string $remote
129- * @param string $id
130122 */
131123 public function testGetCloudId (string $ user , ?string $ remote , string $ id , ?string $ searchCloudId = null , ?string $ localHost = 'https://example.com ' , ?string $ expectedRemoteId = null ): void {
132124 if ($ remote !== null ) {
0 commit comments