Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Apr 7, 2024
1 parent 876139b commit b37852f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"simplesamlphp/simplesamlphp": "^2.2",
"simplesamlphp/simplesamlphp-module-ldap": "^2.2",
"symfony/http-foundation": "^6.4",
"symfony/security-bundle": "^6.4"
"symfony/ldap": "^6.4"
},
"require-dev": {
"simplesamlphp/simplesamlphp-test-framework": "^1.6.0"
Expand Down
27 changes: 27 additions & 0 deletions psalm-dev.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0"?>
<psalm
name="SimpleSAMLphp testsuite"
useDocblockTypes="true"
errorLevel="4"
reportMixedIssues="false"
hideExternalErrors="true"
allowStringToStandInForClass="true"
>
<projectFiles>
<directory name="tests" />

<!-- Ignore certain directories -->
<ignoreFiles>
<directory name="vendor" />
</ignoreFiles>
</projectFiles>

<issueHandlers>
<!-- Ignore UnresolvableInclude on CLI-scripts -->
<UnresolvableInclude>
<errorLevel type="suppress">
<file name="tests/bootstrap.php" />
</errorLevel>
</UnresolvableInclude>
</issueHandlers>
</psalm>
3 changes: 1 addition & 2 deletions src/Auth/Source/X509userCert.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,13 @@
use Symfony\Component\Ldap\Security\LdapUserProvider;
use Symfony\Component\Security\Core\Exception\UserNotFoundException;

use function array_key_exists;
use function array_fill_keys;
use function array_key_exists;
use function array_merge;
use function array_values;
use function current;
use function openssl_x509_parse;
use function sprintf;
use function str_replace;

/**
* This class implements x509 certificate authentication with certificate validation against an LDAP directory.
Expand Down
5 changes: 4 additions & 1 deletion tools/composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"symbol-whitelist": [
"SimpleSAML\\Module\\ldap\\ConfigHelper"
"SimpleSAML\\Module\\ldap\\ConfigHelper",
"SimpleSAML\\Module\\ldap\\ConnectorFactory",
"SimpleSAML\\Module\\ldap\\ConnectorInterface",
"Symfony\\Component\\Security\\Core\\Exception\\UserNotFoundException"
]
}

0 comments on commit b37852f

Please sign in to comment.