Skip to content

Commit

Permalink
Merge pull request #9 from sminnee/pulls/fix-tests
Browse files Browse the repository at this point in the history
FIX: Fix test suite
  • Loading branch information
chillu authored Aug 9, 2020
2 parents 84b3615 + b01b0b9 commit 82dcde7
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
node_modules
vendor
silverstripe-cache
composer.lock
13 changes: 8 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
language: php

services:
- mysql

env:
global:
- TRAVIS_NODE_VERSION="10"

matrix:
include:
- php: 7.2
env: DB=MYSQL RECIPE_VERSION=4.4.x-dev PHPUNIT_TEST=1
env: DB=MYSQL FRAMEWORK_VERSION=4.5.1 PHPUNIT_TEST=1
- php: 7.3
env: DB=MYSQL RECIPE_VERSION=4.x-dev PHPUNIT_TEST=1
env: DB=MYSQL FRAMEWORK_VERSION=4.x-dev PHPUNIT_TEST=1 PHPCS_TEST=1

before_script:
- phpenv rehash
- phpenv config-rm xdebug.ini

- composer validate
- composer require --no-update silverstripe/recipe-testing:^1 silverstripe/recipe-cms:"$RECIPE_VERSION"
- composer install --prefer-source --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
- composer require --no-update silverstripe/framework:"$FRAMEWORK_VERSION"
- composer install --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile

script:
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit; fi
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/ *.php; fi
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs src/ tests/; fi

after_success:
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml -F php; fi
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<phpunit bootstrap="vendor/silverstripe/cms/tests/bootstrap.php" colors="true">
<phpunit bootstrap="vendor/silverstripe/framework/tests/bootstrap.php" colors="true">
<testsuite name="silverstripe-module/skeleton">
<directory>tests/</directory>
</testsuite>
Expand Down
1 change: 0 additions & 1 deletion src/Dispatch/Dispatcher.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace SilverStripe\EventDispatcher\Dispatch;

use InvalidArgumentException;
Expand Down
1 change: 0 additions & 1 deletion src/Dispatch/DispatcherLoaderInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace SilverStripe\EventDispatcher\Dispatch;

interface DispatcherLoaderInterface
Expand Down
1 change: 0 additions & 1 deletion src/Dispatch/EventDispatcherInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace SilverStripe\EventDispatcher\Dispatch;

use SilverStripe\EventDispatcher\Event\EventHandlerInterface;
Expand Down
2 changes: 0 additions & 2 deletions src/Event/EventContextInterface.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace SilverStripe\EventDispatcher\Event;


interface EventContextInterface
{
/**
Expand Down
1 change: 0 additions & 1 deletion src/Event/EventHandlerInterface.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace SilverStripe\EventDispatcher\Event;

interface EventHandlerInterface
Expand Down
1 change: 0 additions & 1 deletion src/Symfony/Backend.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php


namespace SilverStripe\EventDispatcher\Symfony;

use SilverStripe\EventDispatcher\Dispatch\EventDispatcherInterface;
Expand Down
2 changes: 0 additions & 2 deletions src/Symfony/Event.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace SilverStripe\EventDispatcher\Symfony;


use SilverStripe\Core\Injector\Injectable;
use SilverStripe\EventDispatcher\Event\EventContextInterface;
use Symfony\Component\EventDispatcher\GenericEvent;
Expand Down
3 changes: 1 addition & 2 deletions tests/Dispatch/MockBackend.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace SilverStripe\EventDispatcher\Tests\Dispatch;


use SilverStripe\EventDispatcher\Dispatch\EventDispatcherInterface;
use SilverStripe\EventDispatcher\Event\EventHandlerInterface;

Expand Down Expand Up @@ -33,5 +31,6 @@ public function addListener(string $eventName, EventHandlerInterface $listener):

public function removeListener(string $eventName, EventHandlerInterface $listener): EventDispatcherInterface
{
return $this;
}
}
2 changes: 0 additions & 2 deletions tests/Dispatch/MockEvent.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?php


namespace SilverStripe\EventDispatcher\Tests\Dispatch;


use SilverStripe\EventDispatcher\Event\EventContextInterface;

class MockEvent implements EventContextInterface
Expand Down

0 comments on commit 82dcde7

Please sign in to comment.