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

Fix tests. #24

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions tests/ConfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public function testThatFinderWorksWithDirSetOnConfig()
$config = new Config();

$iterator = $config->getFinder()->in(__DIR__.'/Fixtures/FinderDirectory')->getIterator();
$this->assertSame(1, count($iterator));
$this->assertCount(1, $iterator);
$iterator->rewind();
$this->assertSame('somefile.php', $iterator->current()->getFilename());
}
Expand All @@ -120,7 +120,7 @@ public function testThatCustomFinderWorks()
$config = Config::create()->setFinder($finder);

$iterator = $config->getFinder()->getIterator();
$this->assertSame(1, count($iterator));
$this->assertCount(1, $iterator);
$iterator->rewind();
$this->assertSame('somefile.php', $iterator->current()->getFilename());
}
Expand All @@ -133,7 +133,7 @@ public function testThatCustomSymfonyFinderWorks()
$config = Config::create()->setFinder($finder);

$iterator = $config->getFinder()->getIterator();
$this->assertSame(1, count($iterator));
$this->assertCount(1, $iterator);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SpacePossum , fix to make it working properly on hhvm is to run iterator_to_array($iterator) first :/
still, even hhvm 3.18 is not fixed that bug... what a shame for hhvm...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wooow, so great :/

$iterator->rewind();
$this->assertSame('somefile.php', $iterator->current()->getFilename());
}
Expand Down