EcomDev / EcomDev_PHPUnit

Magento PHPUnit Integration
http://www.ecomdev.org/shop/code-testing/php-unit-test-suite.html
Open Software License 3.0
299 stars 166 forks source link

Exit code 0 silently after moving a shared fixture to private of another test #267

Closed robbieaverill closed 7 years ago

robbieaverill commented 8 years ago

PHPUnit: 4.8.16 PHP: 5.5.30 EcomDev_PHPUnit: latest from "dev"

I had a scenario where I had two helpers, each with their own tests. Example structure:

# app/code/local/Vendor/Package/Test/Helper:
fixtures:
  -- myfixture.yaml
TimeTest
  -- fixtures
    -- anotherfixture.yaml
  -- TimeTest.php <-- uses @loadFixture myfixture.yaml and also anotherfixture.yaml
DataTest.php <-- uses @loadFixture myfixture.yaml

I moved the DataTest.php into the DataTest folder, and took the fixture with it. After running the test suite overall, the tests died silently somewhere in the middle.

echo $? returns 0 with no output, even while running verbose and debug.

I'm guessing that the fixture couldn't be found, but there wasn't an exception message thrown?

Will investigate tomorrow, but it might be worth adding one if this is the case. I'm not sure whether it's specific to shared fixtures/caching/etc, but thought it was worth noting.

When I moved myfixture.yaml back into the Test/Helper/fixtures directory, both test classes worked correctly again.

robbieaverill commented 8 years ago

Specifically, there is an exception being thrown in this case (see here) however it isn't thrown out in my console and exits with 0

robbieaverill commented 7 years ago

It turned out that we had a custom error handler swallowing the exception messages. Closing.