Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
norberttech committed Feb 21, 2019
1 parent a56f58b commit b07a044
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor/
composer.lock
*.cache
1 change: 0 additions & 1 deletion .php_cs.cache

This file was deleted.

3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ install:

script:
- composer validate --strict --no-check-lock
# simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and
# it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge)
- test:php:cs
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS
2 changes: 1 addition & 1 deletion DependencyInjection/AppInsightsPHPExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function load(array $configs, ContainerBuilder $container)
$container->setParameter('app_insights_php.doctrine.track_dependency', $config['doctrine']['track_dependency']);

if ($config['doctrine']['track_dependency']) {
if (!\class_exists('AppInsightsPHP\\Doctrine\\DBAL\\Logging\\DependencyLogger')) {
if (!class_exists('AppInsightsPHP\\Doctrine\\DBAL\\Logging\\DependencyLogger')) {
throw new \RuntimeException('Please first run `composer require download app-insights-php/doctrine-dependency-logger` if you want to log DBAL queries.');
}

Expand Down
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,20 @@
"symfony/framework-bundle": "^3.4|^4.0"
},
"scripts": {
"test": [
"simple-phpunit"
],
"cs:php:fix": [
"php-cs-fixer fix"
],
"test": [
"@test:php:cs",
"phpunit"
"test:php:cs": [
"php-cs-fixer fix -v --dry-run --using-cache=no"
]
},
"require-dev": {
"app-insights-php/doctrine-dependency-logger": "dev-master",
"phpunit/phpunit": "^7.1",
"friendsofphp/php-cs-fixer": "^2.15"
"friendsofphp/php-cs-fixer": "^2.15",
"symfony/phpunit-bridge": "^4.3"
}
}

0 comments on commit b07a044

Please sign in to comment.