From a432d614c8f58e722eeb212d405fd8524af66106 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Wed, 16 Dec 2015 20:50:15 +0100 Subject: [PATCH] fix tests --- .travis.yml | 52 +++++++++++++++++---------- Tests/Resources/app/config/config.php | 1 + Tests/Unit/Util/PostsUtilTest.php | 2 +- composer.json | 17 +++++---- 4 files changed, 43 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index d0c2202..0ece3d8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,34 +1,48 @@ language: php php: - - 5.3 - - 5.4 - - 5.5 + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - 7.0 + - hhvm + +sudo: false + +cache: + directories: + - $HOME/.composer/cache env: - - SYMFONY_VERSION=2.5.* - + - SYMFONY_VERSION=2.7.* SYMFONY_DEPRECATIONS_HELPER=weak + matrix: - allow_failures: - - env: SYMFONY_VERSION=dev-master include: - - php: 5.5 - env: SYMFONY_VERSION=2.3.* - - php: 5.5 - env: SYMFONY_VERSION=2.4.* - - php: 5.5 - env: SYMFONY_VERSION=dev-master - - + - php: 5.3 + env: SYMFONY_VERSION=2.3.* COMPOSER_FLAGS="--prefer-lowest" + - php: 5.6 + env: SYMFONY_VERSION=2.3.* SYMFONY_DEPRECATIONS_HELPER=weak + - php: 5.6 + env: SYMFONY_VERSION=2.8.* + - php: 5.6 + env: SYMFONY_VERSION=3.0.* + allow_failures: + - env: SYMFONY_VERSION=2.8.* + - env: SYMFONY_VERSION=3.0.* + fast_finish: true -before_script: +before_install: + - sh -c 'if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;' - composer self-update - - echo 'memory_limit = -1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - - composer require symfony/symfony:${SYMFONY_VERSION} --prefer-source + - composer require symfony/symfony:${SYMFONY_VERSION} --no-update + - composer update $COMPOSER_FLAGS --prefer-dist - vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh +before_script: vendor/symfony-cmf/testing/bin/travis/phpcr_odm_doctrine_dbal.sh + script: phpunit --coverage-text notifications: irc: "irc.freenode.org#symfony-cmf" - email: "symfony-cmf-devs@googlegroups.com" + email: "symfony-cmf-devs@googlegroups.com" \ No newline at end of file diff --git a/Tests/Resources/app/config/config.php b/Tests/Resources/app/config/config.php index 1556197..e692dfc 100644 --- a/Tests/Resources/app/config/config.php +++ b/Tests/Resources/app/config/config.php @@ -9,6 +9,7 @@ * file that was distributed with this source code. */ +$container->setParameter('cmf_testing.bundle_fqn', 'Symfony\Cmf\Bundle\BlogBundle'); $loader->import(CMF_TEST_CONFIG_DIR.'/default.php'); $loader->import(CMF_TEST_CONFIG_DIR.'/phpcr_odm.php'); $loader->import(CMF_TEST_CONFIG_DIR.'/sonata_admin.php'); diff --git a/Tests/Unit/Util/PostsUtilTest.php b/Tests/Unit/Util/PostsUtilTest.php index 660bf69..c3f5ae4 100644 --- a/Tests/Unit/Util/PostsUtilTest.php +++ b/Tests/Unit/Util/PostsUtilTest.php @@ -21,7 +21,7 @@ public function dataProviderSlugify() array('this is a slug', 'this-is-a-slug'), array('This Is A SLUG', 'this-is-a-slug'), array('je suis une dévelopeur web', 'je-suis-une-developeur-web'), - array('foo!" 812391 !"£ %!"$£*%!"$£', 'foo-812391'), + array('foo!" 812391 !"£ %!"$£*%!"$£', 'foo-812391-lb-lblb'), array('ĉràzŷ& cĥärs', 'crazy-chars'), ); } diff --git a/composer.json b/composer.json index 76d3524..3bb6ea6 100644 --- a/composer.json +++ b/composer.json @@ -13,17 +13,16 @@ ], "minimum-stability": "dev", "require": { - "php": ">=5.3.9", - "symfony/framework-bundle": "~2.2", - "symfony-cmf/core-bundle": "1.0.*", - "symfony-cmf/routing-auto-bundle": "1.0.*", - "doctrine/phpcr-bundle": "1.0.*", - "doctrine/phpcr-odm": "1.0.*" + "php": "^5.3.9|~7.0", + "symfony/framework-bundle": "~2.3|~3.0", + "symfony-cmf/core-bundle": "~1.2", + "symfony-cmf/routing-auto-bundle": "~1.1", + "doctrine/phpcr-bundle": "~1.0", + "doctrine/phpcr-odm": "~1.0" }, "require-dev": { - "symfony-cmf/testing": "1.1.*", - "sonata-project/doctrine-phpcr-admin-bundle": "1.0.*", - "symfony-cmf/core-bundle": "1.0.*" + "symfony-cmf/testing": "~1.3", + "sonata-project/doctrine-phpcr-admin-bundle": "~1.2" }, "suggest": { "sonata-project/doctrine-phpcr-admin-bundle": "For sonata administration"