diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9bc03b5..48106a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,4 +25,14 @@ jobs: - name: Check PHP CS run: ./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --dry-run --using-cache no --show-progress dots -v - name: Test - run: ./vendor/bin/phpunit + run: ./vendor/bin/phpunit --coverage-cobertura=coverage.xml + - name: Code Coverage + uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: coverage.xml + badge: true + format: 'markdown' + output: 'both' + - name: Write to Job Summary + run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY + diff --git a/EventListener/CampaignSubscriber.php b/EventListener/CampaignSubscriber.php index 333c993..2fb6647 100644 --- a/EventListener/CampaignSubscriber.php +++ b/EventListener/CampaignSubscriber.php @@ -12,8 +12,8 @@ use MauticPlugin\LeuchtfeuerPrintmailingBundle\Event\TriggerCampaignEvent; use MauticPlugin\LeuchtfeuerPrintmailingBundle\Form\Type\ActionType; use MauticPlugin\LeuchtfeuerPrintmailingBundle\Model\TriggerCampaignModel; -use MauticPlugin\LeuchtfeuerPrintmailingBundle\Service\PrintmailingService; use MauticPlugin\LeuchtfeuerPrintmailingBundle\PrintmailingEvents; +use MauticPlugin\LeuchtfeuerPrintmailingBundle\Service\PrintmailingService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class CampaignSubscriber implements EventSubscriberInterface @@ -56,10 +56,10 @@ public static function getSubscribedEvents() { return [ CampaignEvents::CAMPAIGN_ON_BUILD => ['onCampaignBuild', 0], - PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0], - PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0], - PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0], - PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_SAVE => ['onTriggerCampaignPreSave', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_POST_SAVE => ['onTriggerCampaignPostSave', 0], + PrintmailingEvents::TRIGGER_CAMPAIGN_PRE_DELETE => ['onTriggerCampaignPreDelete', 0], + PrintmailingEvents::ON_CAMPAIGN_TRIGGER_ACTION => ['onCampaignTriggerAction', 0], ]; } diff --git a/composer.json b/composer.json index c15c4ef..dfdaaae 100644 --- a/composer.json +++ b/composer.json @@ -47,5 +47,11 @@ ], "scripts": { "cs-fix": "./vendor/bin/php-cs-fixer fix --config .php-cs-fixer.php --using-cache no --show-progress dots -v" + }, + "config": { + "allow-plugins": { + "symfony/flex": true, + "php-http/discovery": false + } } }