Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b7114c7

Browse files
committed
Make tests green again
1 parent 55582fd commit b7114c7

File tree

9 files changed

+40
-2
lines changed

9 files changed

+40
-2
lines changed

src/Symfony/Bundle/SecurityBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"symfony/password-hasher": "^5.4|^6.0|^7.0",
3030
"symfony/security-core": "^6.2|^7.0",
3131
"symfony/security-csrf": "^5.4|^6.0|^7.0",
32-
"symfony/security-http": "^6.3|^7.0"
32+
"symfony/security-http": "^6.3.4|^7.0"
3333
},
3434
"require-dev": {
3535
"symfony/asset": "^5.4|^6.0|^7.0",

src/Symfony/Component/Cache/Traits/RelayProxy.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,11 @@ public function bitcount($key, $start = 0, $end = -1, $by_bit = false): \Relay\R
456456
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitcount(...\func_get_args());
457457
}
458458

459+
public function bitfield($key, ...$args): \Relay\Relay|array|false
460+
{
461+
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->bitfield(...\func_get_args());
462+
}
463+
459464
public function config($operation, $key = null, $value = null): \Relay\Relay|array|bool
460465
{
461466
return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->config(...\func_get_args());

src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridSignedRequestParserTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,9 @@ protected function getSecret(): string
4343
{
4444
return 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE83T4O/n84iotIvIW4mdBgQ/7dAfSmpqIM8kF9mN1flpVKS3GRqe62gw+2fNNRaINXvVpiglSI8eNEc6wEA3F+g==';
4545
}
46+
47+
protected function mustBeSkipped(): bool
48+
{
49+
return !\extension_loaded('openssl');
50+
}
4651
}

src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSecretRequestParserTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,9 @@ protected function getSecret(): string
4747
{
4848
return 'incorrect';
4949
}
50+
51+
protected function mustBeSkipped(): bool
52+
{
53+
return !\extension_loaded('openssl');
54+
}
5055
}

src/Symfony/Component/Mailer/Bridge/Sendgrid/Tests/Webhook/SendgridWrongSignatureRequestParserTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,9 @@ protected function getSecret(): string
4747
{
4848
return 'MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE83T4O/n84iotIvIW4mdBgQ/7dAfSmpqIM8kF9mN1flpVKS3GRqe62gw+2fNNRaINXvVpiglSI8eNEc6wEA3F+g==';
4949
}
50+
51+
protected function mustBeSkipped(): bool
52+
{
53+
return !\extension_loaded('openssl');
54+
}
5055
}

src/Symfony/Component/Messenger/Bridge/Doctrine/Tests/Transport/DoctrineIntegrationTest.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Doctrine\DBAL\Configuration;
1515
use Doctrine\DBAL\DriverManager;
16+
use Doctrine\DBAL\Result;
1617
use Doctrine\DBAL\Schema\AbstractSchemaManager;
1718
use Doctrine\DBAL\Schema\DefaultSchemaManagerFactory;
1819
use Doctrine\DBAL\Tools\DsnParser;
@@ -56,6 +57,10 @@ public function testConnectionSendAndGet()
5657

5758
public function testSendWithDelay()
5859
{
60+
if (interface_exists(Result::class)) {
61+
$this->markTestSkipped('Skip on Doctrine DBAL 2');
62+
}
63+
5964
$this->connection->send('{"message": "Hi i am delayed"}', ['type' => DummyMessage::class], 600000);
6065

6166
$result = $this->driverConnection->createQueryBuilder()

src/Symfony/Component/Process/Tests/Messenger/RunProcessMessageHandlerTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public function testRunFailedProcess()
3333
(new RunProcessMessageHandler())(new RunProcessMessage(['invalid']));
3434
} catch (RunProcessFailedException $e) {
3535
$this->assertSame(['invalid'], $e->context->command);
36-
$this->assertSame(127, $e->context->exitCode);
36+
$this->assertSame('\\' === \DIRECTORY_SEPARATOR ? 1 : 127, $e->context->exitCode);
3737

3838
return;
3939
}

src/Symfony/Component/VarDumper/Tests/Dumper/CliDumperTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,10 @@ public function testDumpArrayWithColor($value, $flags, $expectedOut)
460460

461461
public function testCollapse()
462462
{
463+
if ('\\' === \DIRECTORY_SEPARATOR) {
464+
$this->markTestSkipped('This test cannot be run on Windows.');
465+
}
466+
463467
$stub = new Stub();
464468
$stub->type = Stub::TYPE_OBJECT;
465469
$stub->class = 'stdClass';

src/Symfony/Component/Webhook/Test/AbstractRequestParserTestCase.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ abstract class AbstractRequestParserTestCase extends TestCase
2626
*/
2727
public function testParse(string $payload, RemoteEvent $expected)
2828
{
29+
if ($this->mustBeSkipped()) {
30+
$this->markTestSkipped('This test cannot be run.');
31+
}
32+
2933
$request = $this->createRequest($payload);
3034
$parser = $this->createRequestParser();
3135
$wh = $parser->parse($request, $this->getSecret());
@@ -66,4 +70,9 @@ protected static function getFixtureExtension(): string
6670
{
6771
return 'json';
6872
}
73+
74+
protected function mustBeSkipped(): bool
75+
{
76+
return false;
77+
}
6978
}

0 commit comments

Comments
 (0)