Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace useless specific output file to temp file at test. #468

Merged
merged 1 commit into from
Jan 29, 2021

Conversation

sasezaki
Copy link
Contributor

Currently, tests/OutputFormatter/data/generated-baseline.yml is committed that result of basicDataProvider data set #0.

After developer running test, generated-baseline.yml file will be chagned with other data set.

eg.

$ git diff
diff --git a/tests/OutputFormatter/data/generated-baseline.yml b/tests/OutputFormatter/data/generated-baseline.yml
index 1c28cb2..c3af77a 100644
--- a/tests/OutputFormatter/data/generated-baseline.yml
+++ b/tests/OutputFormatter/data/generated-baseline.yml
@@ -1,3 +1,3 @@
 skip_violations:
-  ClassA:
-    ClassB: ClassB
+  OriginalA:
+    - OriginalB

Because, PHPUnit would randomly test for dataProvider data set.

$ ./tools/phpunit.phar --testdox --filter "testBasic" tests/OutputFormatter/BaselineOutputFormatterTest.php
PHPUnit 8.5.13 by Sebastian Bergmann and contributors.

Random seed:   1611926497

Baseline Output Formatter (Tests\SensioLabs\Deptrac\OutputFormatter\BaselineOutputFormatter)
 ✔ Basic with data set 0
 ✔ Basic with data set 2
 ✔ Basic with data set 4
 ✔ Basic with data set 3
 ✔ Basic with data set 1

Time: 2.5 seconds, Memory: 14.00 MB

OK (5 tests, 5 assertions)

This generated-baseline.yml changes will be troubled when using git commit -a -m or other git commands under developing.
so, I propose this fix.

@smoench smoench added this to the 0.10.3 milestone Jan 29, 2021
@smoench smoench merged commit 5631b2a into qossmic:master Jan 29, 2021
@smoench
Copy link
Contributor

smoench commented Jan 29, 2021

Thank you @sasezaki!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants