Skip to content

[VarDumper][Ldap] relax some locally failing tests #31132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/Symfony/Component/Ldap/Tests/LdapTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ class LdapTestCase extends TestCase
{
protected function getLdapConfig()
{
$h = @ldap_connect(getenv('LDAP_HOST'), getenv('LDAP_PORT'));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest checking first whether we have values for these env variable. It does not make sense to try to connect if they were not provided.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are in the phpunit.xml.dist so that's not really needed


if (!$h || !@ldap_bind($h)) {
$this->markTestSkipped('No server is listening on LDAP_HOST:LDAP_PORT');
}

ldap_close($h);

return [
'host' => getenv('LDAP_HOST'),
'port' => getenv('LDAP_PORT'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function testReflectionCaster()
%A]
constants: array:3 [
"IS_IMPLICIT_ABSTRACT" => 16
"IS_EXPLICIT_ABSTRACT" => 32
"IS_EXPLICIT_ABSTRACT" => %d
"IS_FINAL" => %d
]
properties: array:%d [
Expand Down