-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Basic Test Improvements (#2)
* Test improvements and GitHub Actions improvements * Updated .gitattributes * Conflict with known bad versions of `tightenco/collect`
- Loading branch information
1 parent
400436f
commit ec620b1
Showing
8 changed files
with
179 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php_cs.dist export-ignore | ||
phpunit.xml.dist export-ignore | ||
/Resources/doc export-ignore | ||
/Tests export-ignore | ||
* text=auto | ||
|
||
/.github export-ignore | ||
.editorconfig export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.php_cs.dist export-ignore | ||
.whitesource export-ignore | ||
/Resources/doc export-ignore | ||
/Tests export-ignore | ||
docker-compose.yml export-ignore | ||
phpcs.xml.dist export-ignore | ||
phpstan.neon.dist export-ignore | ||
phpunit.xml.dist export-ignore | ||
psalm.xml.dist export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Iter8\Bundle\LdapRecordBundle\Tests; | ||
|
||
use PHPUnit\Framework\TestCase as PHPUnitTestCase; | ||
|
||
class TestCase extends PHPUnitTestCase | ||
{ | ||
protected function getLdapConfig(): array | ||
{ | ||
/** @var resource|null $h */ | ||
$h = @ldap_connect((string) getenv('LDAP_HOST'), (int) getenv('LDAP_PORT')); | ||
@ldap_set_option($h, \LDAP_OPT_PROTOCOL_VERSION, 3); | ||
|
||
if (!\is_resource($h) || !@ldap_bind($h)) { | ||
self::markTestSkipped('No server is listening on LDAP_HOST:LDAP_PORT'); | ||
} | ||
|
||
ldap_unbind($h); | ||
|
||
return [ | ||
'host' => getenv('LDAP_HOST'), | ||
'port' => getenv('LDAP_PORT'), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: '2' | ||
|
||
services: | ||
ldap: | ||
image: bitnami/openldap | ||
ports: | ||
- 3389:3389 | ||
environment: | ||
- LDAP_ADMIN_USERNAME=admin | ||
- LDAP_ADMIN_PASSWORD=a_great_password | ||
- LDAP_USERS=a | ||
- LDAP_PASSWORDS=a | ||
- LDAP_ROOT=dc=local,dc=com | ||
- LDAP_PORT_NUMBER=3389 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters