ajouve/doctrine-fixtures-test

Fixture test case for Doctrine Fixture and PHPUnit

v1.0.0 2016-10-20 09:14 UTC

This package is not auto-updated.

Last update: 2024-11-01 21:37:55 UTC


README

Web test case to load yours Doctrines Fixtures

Example

client->getContainer()->get('doctrine'); $this->articleRepository = $doctrine->getRepository('AppBundle:Article'); } public function testFindAll() { $articles = $this->articleRepository->findAll(); $this->assertEquals('My first article', $articles[0]->getTitle()); } } Have a look to the folloing link for more informations [http://blog.ajouve.com/symfony2/phpunit/doctrine2/2015/11/15/set-up-doctrine2-fixtures-when-testing-with-phpunit-and-sqlite.html](http://blog.ajouve.com/symfony2/phpunit/doctrine2/2015/11/15/set-up-doctrine2-fixtures-when-testing-with-phpunit-and-sqlite.html)