-
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.
* Drop support for PHP 7.x Small refactors to use PHP 8.0 features and optimize some code * Add a test case for when container does not have the extension loaded
- Loading branch information
1 parent
a36bd8a
commit 6dd9c68
Showing
63 changed files
with
654 additions
and
617 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
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 |
---|---|---|
@@ -1,36 +1,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
colors="true" | ||
beStrictAboutChangesToGlobalState="true"> | ||
<!-- https://phpunit.readthedocs.io/en/9.6/ --> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.6/phpunit.xsd" bootstrap="tests/bootstrap.php" | ||
colors="true" beStrictAboutChangesToGlobalState="true"> | ||
<coverage processUncoveredFiles="false"> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
<exclude> | ||
<file>src/Traits/ConnectionToolsTrait.php</file> | ||
</exclude> | ||
<report> | ||
<clover outputFile="tests/.results/tests-clover.xml"/> | ||
<html outputDirectory="tests/.results/html/"/> | ||
</report> | ||
</coverage> | ||
<php> | ||
<ini name="error_reporting" value="-1"/> | ||
<server name="APP_ENV" value="test" force="true"/> | ||
</php> | ||
<testsuites> | ||
<testsuite name="TestingBundle Test Suite"> | ||
<directory>./tests/</directory> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<filter> | ||
<whitelist processUncoveredFilesFromWhitelist="false"> | ||
<directory>src</directory> | ||
<exclude> | ||
<file>src/Traits/ConnectionToolsTrait.php</file> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
|
||
<listeners> | ||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener"/> | ||
</listeners> | ||
|
||
<logging> | ||
<log type="coverage-clover" target="tests/.results/tests-clover.xml"/> | ||
<log type="junit" target="tests/.results/tests-junit.xml"/> | ||
<log type="coverage-html" target="tests/.results/html/"/> | ||
<junit outputFile="tests/.results/tests-junit.xml"/> | ||
</logging> | ||
</phpunit> |
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,21 @@ | ||
<?php | ||
declare(strict_types=1); | ||
|
||
namespace Kununu\TestingBundle\DependencyInjection\Compiler; | ||
|
||
use Kununu\TestingBundle\DependencyInjection\ExtensionConfigurationInterface; | ||
use Kununu\TestingBundle\DependencyInjection\KununuTestingExtension; | ||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
|
||
abstract class AbstractCompilerPass implements CompilerPassInterface | ||
{ | ||
protected function getExtensionConfiguration(ContainerBuilder $containerBuilder): ?array | ||
{ | ||
$extension = $containerBuilder->hasExtension(KununuTestingExtension::ALIAS) | ||
? $containerBuilder->getExtension(KununuTestingExtension::ALIAS) | ||
: null; | ||
|
||
return $extension instanceof ExtensionConfigurationInterface ? $extension->getConfig() : null; | ||
} | ||
} |
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
Oops, something went wrong.