diff --git a/.travis.yml b/.travis.yml index 71b9755..3f14905 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,21 @@ -dist: trusty - -language: php - php: - - 5.4 - - 5.5 - - 5.6 - - 7.0 - - hhvm - -# faster builds on new travis setup not using sudo +- 5.4 +- 5.5 +- 5.6 +- 7.0 +- 7.1 +matrix: + include: + - php: hhvm + sudo: true + dist: trusty + group: edge + cache: + directories: "$HOME/.composer/cache" + before_install: + - wget https://phar.phpunit.de/phpunit-4.5.1.phar + script: + - php phpunit-4.5.1.phar --verbose $PHPUNIT_FLAGS sudo: false # cache vendor dirs @@ -19,7 +25,6 @@ cache: install: - travis_retry composer self-update && composer --version - - travis_retry composer global require "fxp/composer-asset-plugin:^1.3.1" - export PATH="$HOME/.composer/vendor/bin:$PATH" - travis_retry composer install --prefer-dist --no-interaction diff --git a/composer.json b/composer.json index da2c19f..7f404e7 100644 --- a/composer.json +++ b/composer.json @@ -21,6 +21,12 @@ "yiisoft/yii2": "~2.0.6", "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*" }, + "repositories": [ + { + "type": "composer", + "url": "https://asset-packagist.org" + } + ], "autoload": { "psr-4": { "yii\\bootstrap\\": "" @@ -29,10 +35,6 @@ "extra": { "branch-alias": { "dev-master": "2.0.x-dev" - }, - "asset-installer-paths": { - "npm-asset-library": "vendor/npm", - "bower-asset-library": "vendor/bower" } } } diff --git a/tests/TestCase.php b/tests/TestCase.php index 912f484..39491b4 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -28,26 +28,19 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase } /** - * Populates Yii::$app with a new application - * The application will be destroyed on tearDown() automatically. - * @param array $config The application configuration, if needed - * @param string $appClass name of the application class to create + * @param array $config + * @param string $appClass */ - protected function mockApplication($config = [], $appClass = '\yii\console\Application') - { - new $appClass(ArrayHelper::merge([ - 'id' => 'testapp', - 'basePath' => __DIR__, - 'vendorPath' => dirname(__DIR__) . '/vendor', - ], $config)); - } - protected function mockWebApplication($config = [], $appClass = '\yii\web\Application') { new $appClass(ArrayHelper::merge([ 'id' => 'testapp', 'basePath' => __DIR__, 'vendorPath' => dirname(__DIR__) . '/vendor', + 'aliases' => [ + '@bower' => '@vendor/bower-asset', + '@npm' => '@vendor/npm-asset', + ], 'components' => [ 'request' => [ 'cookieValidationKey' => 'wefJDF8sfdsfSDefwqdxj9oq',