0

PHP の Respect Validation で文法を更新しましたが、Github エディターを使用していくつかの文字を削除しただけで、Pull Request として変更を送信したにもかかわらず、Travis CI は毎回失敗します。https://travis-ci.org/Respect/Validation/builds/155072854

なぜこれが起こっているのかについての提案はありますか?

4

1 に答える 1

1

PHP 5.6などの 1 つのプラットフォーム ビルド (ジョブとも呼ばれます) を開くと、エラーの内容がわかります。

There were 7 failures:
1) Respect\Validation\Rules\EqualsTest::testShouldThrowTheProperExceptionWhenFailure
Failed asserting that exception message '"24" must equal 42' contains '"24" must be equals 42'.
2) Respect\Validation\Rules\KeyValueTest::testShouldCheckWhenDefinedValuesDoesNotMatch
Failed asserting that exception message 'foo must equal "bar"' contains 'foo must be equals "bar"'.
3) /home/travis/build/Respect/Validation/tests/integration/rules/equals_2.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-"test 1234" must be equals "test 123"
+"test 1234" must equal "test 123"
4) /home/travis/build/Respect/Validation/tests/integration/rules/equals_3.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-- "test 1234" must be equals "test 123"
+- "test 1234" must equal "test 123"
5) /home/travis/build/Respect/Validation/tests/integration/rules/equals_4.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-"test 123" must not be equals "test 123"
+"test 123" must not equal "test 123"
6) /home/travis/build/Respect/Validation/tests/integration/rules/equals_5.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-- "test 123" must not be equals "test 123"
+- "test 123" must not equal "test 123"
7) /home/travis/build/Respect/Validation/tests/integration/rules/keyValue_2.phpt
Failed asserting that format description matches text.
--- Expected
+++ Actual
@@ @@
-password must be equals "password_confirmation"
+password must equal "password_confirmation"

デフォルトのテンプレートequalsをに置き換えたようでequal、これによりエラーが発生します。動作が常に同じであることを確認する単体テストがあります。オープン ソース プロジェクトへの PR を作成する場合は、多くの場合、テストの更新または作成も行う必要があります。

必要に応じて、ローカルでテストを起動して、問題がないことを確認できます。テストの起動方法の詳細については、公式ドキュメントの「Running Tests」セクション(私が寄稿したもの) を参照してください。

依存関係をインストールする

composer install

起動テスト

Linux の場合

vendor/bin/phpunit

Windows の場合

vendor\bin\phpunit
于 2016-08-26T08:23:21.403 に答える