Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Exception while defining multiple Tests in Test Class #31

Closed robert197 closed 7 years ago

robert197 commented 7 years ago

Hey, When i run one test in test class and execute this test with phpunit, this test is running well. After i add more tests or even one more test into this class and run this class again, an exception is thrown with message RuntimeException: Trying to override applicationContext which has already been defined! I though, teardown should handle this problem but it doesn't.

IchHabRecht commented 7 years ago

Hi Robert,

I fear I'm not able to help you without additional information. Can you give some insights into your class/setup/tests?

helhum commented 7 years ago

@robert197 for functional tests you need to provide the FunctionalTests.xml as configuration file to phpunit

vendor/bin/phpunit -c vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml Tests/Functional

for unit tests:

vendor/bin/phpunit -c vendor/nimut/testing-framework/res/Configuration/UnitTests.xml Tests/Unit