This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Executing PHPUnit Tests in eZ 5.0.0...

Executing PHPUnit Tests in eZ 5.0.0 EE Build

Executing PHPUnit Tests in eZ 5.0.0 EE Build

Thursday 06 December 2012 5:21:24 pm - 1 reply


we've build some Bundles on a plain Symfony 2 environment and now "porting" them to eZ Publish 5.0.0 EE environment. The code itself is working, but we're not longer able to start the unit tests via 'phpunit -c ezpublish/', within the eZ Publish 5 project.

We tried to use the bootstrap.php from vendor/ezsystems/ezpublish/ (since there is none in ezpublish/), but this results in missing/wrong require-paths to some legacy-files ('vendor/ezsystems/ezpublish/vendor/ezpublish-legacy/...'). Even linking/fixing those file-paths does not work / leads to more errors.

Could you provide a phpunit.xml, which we could use to test our code within a eZ 5 / Symfony 2 environment?


Modified on Thursday 06 December 2012 5:27:42 pm by Max Marttinen

Thursday 06 December 2012 6:01:36 pm

Hi Max

Glad to see a Symfony application to be ported to eZ Publish 5 happy.gif Emoticon.

So if I understand you correctly, you're trying to run your own tests in eZ Publish 5 / Symfony 2 environment ? If so, what you describe is a known issue and a pull request is pending on this subject (feel free to grab the patch). It's not merged yet because bootstrap.php.cache needs to be generated correctly with SensioDistributionBundle.

Some more troubleshooting :

  • Check that your EzPublishCache class is correctly extending eZ\Bundle\EzPublishCoreBundle\HttpCache
  • Be sure to use EzPublishKernel as a base
  • Be sure to base your controllers (at least the ones to integrate with eZ) with eZ\Bundle\EzPublishCoreBundle\Controller

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from