Browse Source

Fix build (#251)

* Use phpunit from vendor
* Ship our own phpunit as well
* Adapt test to yii 2.0.16
* Remove hhvm, add php 7.3
tags/2.0.10
Mehdi Achour 6 years ago committed by Alexander Makarov
parent
commit
454552b7a9
  1. 16
      .travis.yml
  2. 3
      composer.json
  3. 2
      tests/ActiveFieldTest.php

16
.travis.yml

@ -7,19 +7,7 @@ php:
- 7.0 - 7.0
- 7.1 - 7.1
- 7.2 - 7.2
- 7.3
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 sudo: false
@ -40,7 +28,7 @@ before_script:
fi fi
script: script:
- phpunit --verbose $PHPUNIT_FLAGS - ./vendor/bin/phpunit --verbose $PHPUNIT_FLAGS
after_script: after_script:
- | - |

3
composer.json

@ -35,6 +35,9 @@
"yiisoft/yii2": "~2.0.6", "yiisoft/yii2": "~2.0.6",
"bower-asset/bootstrap": "3.4.* | 3.3.* | 3.2.* | 3.1.*" "bower-asset/bootstrap": "3.4.* | 3.3.* | 3.2.* | 3.1.*"
}, },
"require-dev": {
"phpunit/phpunit": "<7"
},
"repositories": [ "repositories": [
{ {
"type": "composer", "type": "composer",

2
tests/ActiveFieldTest.php

@ -55,7 +55,7 @@ class ActiveFieldTest extends TestCase
$expectedHtml = <<<HTML $expectedHtml = <<<HTML
<div class="form-group field-dynamicmodel-attributename"> <div class="form-group field-dynamicmodel-attributename">
<label class="control-label">Attribute Name</label> <label class="control-label">Attribute Name</label>
<input type="hidden" name="DynamicModel[attributeName]" value=""><div id="dynamicmodel-attributename"><div class="radio"><label><input type="radio" name="DynamicModel[attributeName]" value="1"> name1</label></div> <input type="hidden" name="DynamicModel[attributeName]" value=""><div id="dynamicmodel-attributename" role="radiogroup"><div class="radio"><label><input type="radio" name="DynamicModel[attributeName]" value="1"> name1</label></div>
<div class="radio"><label><input type="radio" name="DynamicModel[attributeName]" value="2"> name2</label></div></div> <div class="radio"><label><input type="radio" name="DynamicModel[attributeName]" value="2"> name2</label></div></div>
<p class="help-block help-block-error"></p> <p class="help-block help-block-error"></p>

Loading…
Cancel
Save