Skip to content

Commit 132b471

Browse files
Fix CI
1 parent 21608f1 commit 132b471

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

src/Symfony/Component/Cache/Tests/Traits/RedisTraitTest.php

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ public function testCreateConnection(string $dsn, string $expectedClass)
3232
throw new SkippedTestSuiteError('REDIS_CLUSTER_HOSTS env var is not defined.');
3333
}
3434

35-
$mock = self::getObjectForTrait(RedisTrait::class);
35+
$mock = new class () {
36+
use RedisTrait;
37+
};
3638
$connection = $mock::createConnection($dsn);
3739

3840
self::assertInstanceOf($expectedClass, $connection);
@@ -44,7 +46,9 @@ public function testUrlDecodeParameters()
4446
self::markTestSkipped('REDIS_AUTHENTICATED_HOST env var is not defined.');
4547
}
4648

47-
$mock = self::getObjectForTrait(RedisTrait::class);
49+
$mock = new class () {
50+
use RedisTrait;
51+
};
4852
$connection = $mock::createConnection('redis://:p%40ssword@'.getenv('REDIS_AUTHENTICATED_HOST'));
4953

5054
self::assertInstanceOf(\Redis::class, $connection);
@@ -101,7 +105,9 @@ public function testPconnectSelectsCorrectDatabase()
101105
}
102106

103107
try {
104-
$mock = self::getObjectForTrait(RedisTrait::class);
108+
$mock = new class () {
109+
use RedisTrait;
110+
};
105111

106112
$dsn = 'redis://'.getenv('REDIS_HOST');
107113

src/Symfony/Component/Filesystem/Tests/FilesystemTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,14 +171,14 @@ public function testCopyForOriginUrlsAndExistingLocalFileDefaultsToCopy()
171171
}
172172

173173
$finder = new PhpExecutableFinder();
174-
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057']));
174+
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057']));
175175
$process->setWorkingDirectory(__DIR__.'/Fixtures/web');
176176

177177
$process->start();
178178

179179
do {
180180
usleep(50000);
181-
} while (!@fopen('http://127.0.0.1:8057', 'r'));
181+
} while (!@fopen('http://localhost:8057', 'r'));
182182

183183
try {
184184
$sourceFilePath = 'http://localhost:8057/logo_symfony_header.png';

src/Symfony/Component/Mime/Tests/Part/DataPartTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ public function testFromPathWithUrl()
143143
}
144144

145145
$finder = new PhpExecutableFinder();
146-
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', '127.0.0.1:8057']));
146+
$process = new Process(array_merge([$finder->find(false)], $finder->findArguments(), ['-dopcache.enable=0', '-dvariables_order=EGPCS', '-S', 'localhost:8057']));
147147
$process->setWorkingDirectory(__DIR__.'/../Fixtures/web');
148148
$process->start();
149149

150150
try {
151151
do {
152152
usleep(50000);
153-
} while (!@fopen('http://127.0.0.1:8057', 'r'));
153+
} while (!@fopen('http://localhost:8057', 'r'));
154154
$p = DataPart::fromPath($file = 'http://localhost:8057/logo_symfony_header.png');
155155
$content = file_get_contents($file);
156156
$this->assertEquals($content, $p->getBody());

0 commit comments

Comments
 (0)