dereuromark 8 年 前
コミット
c128caf5d0
2 ファイル変更6 行追加4 行削除
  1. 4 2
      .travis.yml
  2. 2 2
      tests/TestCase/Model/Behavior/PasswordableBehaviorTest.php

+ 4 - 2
.travis.yml

@@ -28,7 +28,9 @@ matrix:
 before_script:
   - composer self-update
   - composer install --prefer-dist --no-interaction
+
   - composer require yangqi/htmldom:dev-master
+  - if [[ $PHPCS != 1 ]]; then composer require phpunit/phpunit:"^5.7|^6.0"; fi
 
   - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
   - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'CREATE DATABASE cakephp_test;' -U postgres; fi"
@@ -38,10 +40,10 @@ before_script:
   - cp phpunit.xml.dist phpunit.xml
 
 script:
-  - sh -c "if [ '$DEFAULT' = '1' ]; then phpunit; fi"
+  - sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"
   - sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/fig-r/psr2r-sniffer/PSR2R/ruleset.xml --ignore=/vendor,/docs/,test_files/ . ; fi"
 
-  - sh -c "if [ '$CODECOVERAGE' = '1' ]; then phpunit --coverage-clover=clover.xml || true; fi"
+  - sh -c "if [ '$CODECOVERAGE' = '1' ]; then vendor/bin/phpunit --coverage-clover=clover.xml || true; fi"
   - sh -c "if [ '$CODECOVERAGE' = '1' ]; then wget -O codecov.sh https://codecov.io/bash; fi"
   - sh -c "if [ '$CODECOVERAGE' = '1' ]; then bash codecov.sh; fi"
 

+ 2 - 2
tests/TestCase/Model/Behavior/PasswordableBehaviorTest.php

@@ -140,7 +140,7 @@ class PasswordableBehaviorTest extends TestCase {
 		$this->Users->patchEntity($user, $data);
 		$is = $this->Users->save($user);
 		$this->assertTrue((bool)$is);
-		$this->assertEquals(['name', 'id'], $is->visibleProperties());
+		$this->assertEquals(['name', 'created', 'modified', 'id'], $is->visibleProperties());
 
 		$id = $user->id;
 		$user = $this->Users->newEntity();
@@ -152,7 +152,7 @@ class PasswordableBehaviorTest extends TestCase {
 		$this->Users->patchEntity($user, $data);
 		$is = $this->Users->save($user);
 		$this->assertTrue((bool)$is);
-		$this->assertEquals(['id'], $is->visibleProperties());
+		$this->assertEquals(['id', 'modified'], $is->visibleProperties());
 	}
 
 	/**