Skip to content
Snippets Groups Projects
Commit 482acfc0 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

Use phpunit directly

(and fix some deprecation warnings uncovered by this)
parent d426f489
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
"mockery/mockery": "^1.4", "mockery/mockery": "^1.4",
"phpstan/phpstan": "^1.0.0", "phpstan/phpstan": "^1.0.0",
"phpstan/phpstan-phpunit": "^1.0.0", "phpstan/phpstan-phpunit": "^1.0.0",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "^5.2", "symfony/browser-kit": "^5.2",
"symfony/http-client": "^5.2", "symfony/http-client": "^5.2",
"symfony/monolog-bundle": "^3.7", "symfony/monolog-bundle": "^3.7",
...@@ -43,14 +44,14 @@ ...@@ -43,14 +44,14 @@
}, },
"scripts": { "scripts": {
"test": [ "test": [
"@php vendor/bin/simple-phpunit" "@php vendor/bin/phpunit"
], ],
"phpstan": [ "phpstan": [
"@php vendor/bin/simple-phpunit --atleast-version 0", "@php vendor/bin/phpunit --atleast-version 0",
"@php vendor/bin/phpstan analyze --ansi" "@php vendor/bin/phpstan analyze --ansi"
], ],
"psalm": [ "psalm": [
"@php vendor/bin/simple-phpunit --atleast-version 0", "@php vendor/bin/phpunit --atleast-version 0",
"@php vendor/bin/psalm" "@php vendor/bin/psalm"
], ],
"lint": [ "lint": [
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
"@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff" "@php vendor/bin/php-cs-fixer --ansi fix --dry-run --diff"
], ],
"coverage": [ "coverage": [
"@php vendor/bin/simple-phpunit --coverage-html _coverage" "@php vendor/bin/phpunit --coverage-html _coverage"
] ]
} }
} }
This diff is collapsed.
...@@ -7,8 +7,6 @@ parameters: ...@@ -7,8 +7,6 @@ parameters:
paths: paths:
- src - src
- tests - tests
bootstrapFiles:
- vendor/bin/.phpunit/phpunit-9-0/vendor/autoload.php
excludePaths: excludePaths:
- tests/bootstrap.php - tests/bootstrap.php
ignoreErrors: ignoreErrors:
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
<ini name="error_reporting" value="-1"/> <ini name="error_reporting" value="-1"/>
<server name="APP_ENV" value="test" force="true"/> <server name="APP_ENV" value="test" force="true"/>
<server name="SHELL_VERBOSITY" value="-1"/> <server name="SHELL_VERBOSITY" value="-1"/>
<server name="SYMFONY_PHPUNIT_REMOVE" value=""/> <server name="SYMFONY_DEPRECATIONS_HELPER" value='max[direct]=0&amp;quiet[]=indirect'/>
<server name="SYMFONY_PHPUNIT_VERSION" value="9"/>
<server name="SYMFONY_DEPRECATIONS_HELPER" value="weak"/>
<server name="KERNEL_CLASS" value="Dbp\Relay\BasePersonConnectorLdapBundle\Tests\Kernel"/> <server name="KERNEL_CLASS" value="Dbp\Relay\BasePersonConnectorLdapBundle\Tests\Kernel"/>
</php> </php>
<testsuites> <testsuites>
......
...@@ -10,7 +10,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface; ...@@ -10,7 +10,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface class Configuration implements ConfigurationInterface
{ {
public function getConfigTreeBuilder() public function getConfigTreeBuilder(): TreeBuilder
{ {
$treeBuilder = new TreeBuilder('dbp_relay_base_person_connector_ldap'); $treeBuilder = new TreeBuilder('dbp_relay_base_person_connector_ldap');
......
...@@ -378,7 +378,7 @@ class LDAPApi implements LoggerAwareInterface, ServiceSubscriberInterface ...@@ -378,7 +378,7 @@ class LDAPApi implements LoggerAwareInterface, ServiceSubscriberInterface
return $this->currentPerson; return $this->currentPerson;
} }
public static function getSubscribedServices() public static function getSubscribedServices(): array
{ {
return [ return [
UserSessionInterface::class, UserSessionInterface::class,
......
...@@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; ...@@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class PersonForExternalServiceSubscriber implements EventSubscriberInterface class PersonForExternalServiceSubscriber implements EventSubscriberInterface
{ {
public static function getSubscribedEvents() public static function getSubscribedEvents(): array
{ {
return [ return [
PersonForExternalServiceEvent::NAME => 'onEvent', PersonForExternalServiceEvent::NAME => 'onEvent',
......
...@@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; ...@@ -10,7 +10,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class PersonFromUserItemSubscriber implements EventSubscriberInterface class PersonFromUserItemSubscriber implements EventSubscriberInterface
{ {
public static function getSubscribedEvents() public static function getSubscribedEvents(): array
{ {
return [ return [
PersonFromUserItemPreEvent::NAME => 'onPre', PersonFromUserItemPreEvent::NAME => 'onPre',
......
...@@ -9,7 +9,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; ...@@ -9,7 +9,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class PersonUserItemSubscriber implements EventSubscriberInterface class PersonUserItemSubscriber implements EventSubscriberInterface
{ {
public static function getSubscribedEvents() public static function getSubscribedEvents(): array
{ {
return [ return [
PersonUserItemPreEvent::NAME => 'onPre', PersonUserItemPreEvent::NAME => 'onPre',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment