File tree Expand file tree Collapse file tree 2 files changed +30
-5
lines changed
src/Symfony/Component/Finder/Tests/Iterator Expand file tree Collapse file tree 2 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 44
44
LDAP_PORT_NUMBER : 3389
45
45
LDAP_USERS : a
46
46
LDAP_PASSWORDS : a
47
+ ftp :
48
+ image : onekilo79/ftpd_test
49
+ ports :
50
+ - 21:21
51
+ - 30000-30009:30000-30009
52
+ volumes :
53
+ - ./:/hostmount
47
54
redis :
48
55
image : redis:6.2.8
49
56
ports :
@@ -144,6 +151,11 @@ jobs:
144
151
curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default/buckets -d 'ramQuotaMB=100&bucketType=ephemeral&name=cache'
145
152
curl -s -u Administrator:111111 -X POST http://localhost:8091/pools/default -d 'memoryQuota=256'
146
153
154
+ - name : Create FTP fixtures
155
+ run : |
156
+ mkdir -p ./ftpusers/test/pub
157
+ touch ./ftpusers/test/pub/example ./ftpusers/test/readme.txt
158
+
147
159
- name : Setup PHP
148
160
uses : shivammathur/setup-php@v2
149
161
with :
@@ -196,6 +208,7 @@ jobs:
196
208
- name : Run tests
197
209
run : ./phpunit --group integration -v
198
210
env :
211
+ INTEGRATION_FTP_URL : ' ftp://test:test@localhost'
199
212
REDIS_HOST : ' localhost:16379'
200
213
REDIS_AUTHENTICATED_HOST : ' localhost:16380'
201
214
REDIS_CLUSTER_HOSTS : ' localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
Original file line number Diff line number Diff line change @@ -24,26 +24,38 @@ protected function setUp(): void
24
24
25
25
/**
26
26
* @group network
27
+ * @group integration
27
28
*/
28
29
public function testRewindOnFtp ()
29
30
{
30
- $ i = new RecursiveDirectoryIterator ('ftp://test.rebex.net/ ' , \RecursiveDirectoryIterator::SKIP_DOTS );
31
+ if (!getenv ('INTEGRATION_FTP_URL ' )) {
32
+ self ::markTestSkipped ('INTEGRATION_FTP_URL env var is not defined. ' );
33
+ }
34
+
35
+ $ i = new RecursiveDirectoryIterator (getenv ('INTEGRATION_FTP_URL ' ).\DIRECTORY_SEPARATOR , \RecursiveDirectoryIterator::SKIP_DOTS );
31
36
32
37
$ i ->rewind ();
33
38
34
- $ this ->assertTrue ( true );
39
+ $ this ->expectNotToPerformAssertions ( );
35
40
}
36
41
37
42
/**
38
43
* @group network
44
+ * @group integration
39
45
*/
40
46
public function testSeekOnFtp ()
41
47
{
42
- $ i = new RecursiveDirectoryIterator ('ftp://test.rebex.net/ ' , \RecursiveDirectoryIterator::SKIP_DOTS );
48
+ if (!getenv ('INTEGRATION_FTP_URL ' )) {
49
+ self ::markTestSkipped ('INTEGRATION_FTP_URL env var is not defined. ' );
50
+ }
51
+
52
+ $ ftpUrl = getenv ('INTEGRATION_FTP_URL ' );
53
+
54
+ $ i = new RecursiveDirectoryIterator ($ ftpUrl .\DIRECTORY_SEPARATOR , \RecursiveDirectoryIterator::SKIP_DOTS );
43
55
44
56
$ contains = [
45
- ' ftp://test.rebex.net ' .\DIRECTORY_SEPARATOR .'pub ' ,
46
- ' ftp://test.rebex.net ' .\DIRECTORY_SEPARATOR .'readme.txt ' ,
57
+ $ ftpUrl .\DIRECTORY_SEPARATOR .'pub ' ,
58
+ $ ftpUrl .\DIRECTORY_SEPARATOR .'readme.txt ' ,
47
59
];
48
60
$ actual = [];
49
61
You can’t perform that action at this time.
0 commit comments