diff --git a/.travis.yml b/.travis.yml index 9b516338..00f1a969 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,12 +34,13 @@ matrix: - php: 5.6 env: NPM_TEST=1 - php: 7.0 - env: DB=MYSQL PDO=1 PHPUNIT_TEST=1 + env: DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1 before_script: - composer self-update || true - phpenv rehash - phpenv config-rm xdebug.ini + - echo 'memory_limit = 2G' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini - composer install --prefer-dist - "if [ \"$DB\" = \"PGSQL\" ]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi" - "if [ \"$DB\" = \"SQLITE\" ]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi" @@ -56,6 +57,8 @@ script: - "if [ \"$PHPUNIT_TEST\" = \"1\" ]; then vendor/bin/phpunit tests flush=1; fi" - "if [ \"$BEHAT_TEST\" = \"1\" ]; then vendor/bin/behat .; fi" - "if [ \"$NPM_TEST\" = \"1\" ]; then (nvm use 4 && npm run lint); fi" + - "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then phpdbg -qrr vendor/bin/phpunit tests flush=1 --coverage-clover=coverage.xml; fi" + - "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi" after_failure: - php ~/travis-support/travis_upload_artifacts.php --if-env BEHAT_TEST,ARTIFACTS_BUCKET,ARTIFACTS_KEY,ARTIFACTS_SECRET --target-path $TRAVIS_REPO_SLUG/$TRAVIS_BUILD_ID/$TRAVIS_JOB_ID --artifacts-base-url https://s3.amazonaws.com/$ARTIFACTS_BUCKET/ diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4bfdbc59..a30a8a3a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,21 +1,3 @@ - @@ -26,12 +8,6 @@ - - - sanitychecks - - - . diff --git a/tests/controller/ContentControllerTest.php b/tests/controller/ContentControllerTest.php index a7890d34..796ead3f 100755 --- a/tests/controller/ContentControllerTest.php +++ b/tests/controller/ContentControllerTest.php @@ -145,7 +145,7 @@ class ContentControllerTest extends FunctionalTest { /** * Tests that {@link ContentController::getViewer()} chooses the correct templates. * - * @covers ContentController::getViewer() + * @covers SilverStripe\CMS\Controllers\ContentController::getViewer() **/ public function testGetViewer() { diff --git a/tests/model/SiteTreeTest.php b/tests/model/SiteTreeTest.php index 5c72a954..b5ae123a 100644 --- a/tests/model/SiteTreeTest.php +++ b/tests/model/SiteTreeTest.php @@ -838,7 +838,7 @@ class SiteTreeTest extends SapphireTest { } /** - * @covers SiteTree::validURLSegment + * @covers SilverStripe\CMS\Model\SiteTree::validURLSegment */ public function testValidURLSegmentURLSegmentConflicts() { $sitetree = new SiteTree(); @@ -869,7 +869,7 @@ class SiteTreeTest extends SapphireTest { } /** - * @covers SiteTree::validURLSegment + * @covers SilverStripe\CMS\Model\SiteTree::validURLSegment */ public function testValidURLSegmentClassNameConflicts() { $sitetree = new SiteTree(); @@ -879,7 +879,7 @@ class SiteTreeTest extends SapphireTest { } /** - * @covers SiteTree::validURLSegment + * @covers SilverStripe\CMS\Model\SiteTree::validURLSegment */ public function testValidURLSegmentControllerConflicts() { Config::inst()->update('SilverStripe\\CMS\\Model\\SiteTree', 'nested_urls', true);