Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tests no longer pass on a fresh repository checkout #16347

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

Closed
jakzal opened this issue Oct 26, 2015 · 8 comments
Closed

Tests no longer pass on a fresh repository checkout #16347

jakzal opened this issue Oct 26, 2015 · 8 comments

Comments

@jakzal
Copy link
Contributor

jakzal commented Oct 26, 2015

$ git clone [email protected]:symfony/symfony.git && cd symfony && composer install
$ phpunit --stop-on-failure src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/GenericEntityChoiceListTest.php
PHPUnit 5.0.8 by Sebastian Bergmann and contributors.

E

Time: 149 ms, Memory: 14.00Mb

There was 1 error:

1) Symfony\Bridge\Doctrine\Tests\Form\ChoiceList\GenericEntityChoiceListTest::testEntitiesMustHaveAToStringMethod
Doctrine\Common\Annotations\AnnotationException: [Semantical Error] The annotation "@Doctrine\ORM\Mapping\Entity" in class Symfony\Bridge\Doctrine\Tests\Fixtures\SingleIntIdEntity does not exist, or could not be auto-loaded.

/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationException.php:54
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:708
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:641
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/DocParser.php:334
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationReader.php:195
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php:63
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php:116
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:332
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:216
/symfony/src/Symfony/Bridge/Doctrine/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:265
/symfony/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/GenericEntityChoiceListTest.php:43

FAILURES!
Tests: 1, Assertions: 0, Errors: 1.

composer require symfony/phpunit-bridge would solve the issue as we moved doctrine annotation autoloading to the phpunit-bridge in #13772. However, it was later removed from require-dev in #16190.

@nicolas-grekas
Copy link
Member

Yo need to use the local phpunit: ./phpunit

@jakzal
Copy link
Contributor Author

jakzal commented Oct 26, 2015

Was it really necessary to implement ./phpunit (I initially thought it's for CI only)? I know it's documented, but it's also a bit awkward.

@nicolas-grekas
Copy link
Member

And ./phpunit symfony to run tests in parallel

@jakzal
Copy link
Contributor Author

jakzal commented Oct 26, 2015

./phpunit modifies composer.json. What's the reason for this approach instead of putting phpunit-bridge as a dependency explicitly?

@nicolas-grekas
Copy link
Member

You should check the git history :-) phpunit's composer.json is modified to remove symfony/yaml, that is otherwise untestable.

@jakzal
Copy link
Contributor Author

jakzal commented Oct 27, 2015

Ok, makes sense. Why's the phpunit-bridge also there? :)

@nicolas-grekas
Copy link
Member

@jakzal because it reduces copy/pasting (and more importantly forgetting a copy/paste :) ), especially since we also need a test listener for handling @group time-sensitive annotations and collecting/replaying skipped tests (used on appveyor)

@jakzal
Copy link
Contributor Author

jakzal commented Oct 28, 2015

Thanks for explanations 👍 .

@jakzal jakzal closed this as completed Oct 28, 2015
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

No branches or pull requests

2 participants