Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ language: php
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.phpunit

env:
global:
- deps=""
- SYMFONY_PHPUNIT_DIR="$HOME/.phpunit"

matrix:
fast_finish: true
Expand All @@ -34,6 +36,6 @@ install:
- if [ "$deps" = "" ]; then composer install; fi

script:
- if [[ "$xdebug" = "yes" ]]; then phpunit --coverage-clover=coverage.clover; else phpunit; fi
- if [[ "$xdebug" = "yes" ]]; then vendor/bin/simple-phpunit --coverage-clover=coverage.clover; else vendor/bin/simple-phpunit; fi
- if [[ "$xdebug" = "yes" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [[ "$xdebug" = "yes" ]]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@
"php": "^5.6 || ^7.0",
"php-xapi/model": "^1.0 || ^2.0",
"symfony/config": "~2.3",
"symfony/validator": "^2.6.2|^3.0"
"symfony/validator": "^2.7 || ^3.0"
},
"require-dev": {
"doctrine/annotations": "~1.0",
"php-xapi/test-fixtures": "^1.0",
"ramsey/uuid": "^2.9 || ^3.0",
"symfony/phpunit-bridge": "^3.4 || ^4.0",
"symfony/property-access": "~2.3"
},
"minimum-stability": "dev",
Expand Down
7 changes: 2 additions & 5 deletions tests/AbstractModelValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@

namespace Xabbuh\XApi\Validator\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Validation;
use Symfony\Component\Validator\Validator\ValidatorInterface;

/**
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
abstract class AbstractModelValidatorTest extends \PHPUnit_Framework_TestCase
abstract class AbstractModelValidatorTest extends TestCase
{
/**
* @var Validator
Expand All @@ -28,10 +29,6 @@ protected function setUp()
{
$validatorBuilder = Validation::createValidatorBuilder();

if (method_exists($validatorBuilder, 'setApiVersion')) {
$validatorBuilder->setApiVersion(Validation::API_VERSION_2_5);
}

$this->validator = $validatorBuilder
->addXmlMapping(__DIR__.'/../metadata/Activity.xml')
->addXmlMapping(__DIR__.'/../metadata/Agent.xml')
Expand Down
3 changes: 2 additions & 1 deletion tests/ValidatorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@

namespace Xabbuh\XApi\Validator\Tests;

use PHPUnit\Framework\TestCase;
use Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface;
use Symfony\Component\Validator\ValidatorInterface;
use Xabbuh\XApi\Validator\Validator;

/**
* @author Christian Flothmann <christian.flothmann@xabbuh.de>
*/
class ValidatorTest extends \PHPUnit_Framework_TestCase
class ValidatorTest extends TestCase
{
public function testRegisterXApiConstraints()
{
Expand Down