-
Notifications
You must be signed in to change notification settings - Fork 2
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
Fix tests. #24
Fix tests. #24
Changes from 3 commits
e1d2cd8
ab26018
8384df2
15675cf
8066075
012cded
8dd0834
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ matrix: | |
env: DEPLOY=yes TASK_TESTS_COVERAGE=1 | ||
- php: 7.1 | ||
env: TASK_SCA=1 | ||
- php: nightly | ||
env: COMPOSER_FLAGS="--ignore-platform-reqs" TASK_CS=0 | ||
- php: 5.3 | ||
env: SKIP_LINT_TEST_CASES=1 COMPOSER_FLAGS="--prefer-stable --prefer-lowest" | ||
- php: 5.4 | ||
|
@@ -80,8 +82,7 @@ script: | |
- if [ $TASK_TESTS == 1 ] && [ $TASK_TESTS_COVERAGE == 0 ]; then vendor/bin/phpunit --verbose; fi | ||
- if [ $TASK_TESTS == 1 ] && [ $TASK_TESTS_COVERAGE == 1 ]; then phpdbg -qrr vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml; fi | ||
|
||
- if [ $TASK_SCA == 1 ]; then git checkout . -q; fi | ||
|
||
- if [ $TASK_CS == 1 ]; then git checkout . -q; fi | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why this change? if no SCA was performed, there is no files to checkout, isn't it ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yes, this change is not good |
||
- if [ $TASK_CS == 1 ]; then php php-cs-fixer --diff --dry-run -v fix; fi | ||
|
||
after_success: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,7 @@ public function testThatFinderWorksWithDirSetOnConfig() | |
$config = new Config(); | ||
|
||
$iterator = $config->getFinder()->in(__DIR__.'/Fixtures/FinderDirectory')->getIterator(); | ||
$this->assertSame(1, count($iterator)); | ||
$this->assertSame(1, iterator_count($iterator)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting, do you have an ref for that change ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah, my question is more like "is there a hhvm version that has fixed that bug already" :D There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. so, it still not working on hhvm :/ |
||
$iterator->rewind(); | ||
$this->assertSame('somefile.php', $iterator->current()->getFilename()); | ||
} | ||
|
@@ -120,7 +120,7 @@ public function testThatCustomFinderWorks() | |
$config = Config::create()->setFinder($finder); | ||
|
||
$iterator = $config->getFinder()->getIterator(); | ||
$this->assertSame(1, count($iterator)); | ||
$this->assertSame(1, iterator_count($iterator)); | ||
$iterator->rewind(); | ||
$this->assertSame('somefile.php', $iterator->current()->getFilename()); | ||
} | ||
|
@@ -133,7 +133,7 @@ public function testThatCustomSymfonyFinderWorks() | |
$config = Config::create()->setFinder($finder); | ||
|
||
$iterator = $config->getFinder()->getIterator(); | ||
$this->assertSame(1, count($iterator)); | ||
$this->assertSame(1, iterator_count($iterator)); | ||
$iterator->rewind(); | ||
$this->assertSame('somefile.php', $iterator->current()->getFilename()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what I was thinking actually was introduction of new ENV flag:
PHP_CS_FIXER_IGNORE_ENV=1
and allow tool to run on 7.2 with that flag.For that, we would be able to run the SCA/CS tasks