cakephp / codeception

CakePHP module for Codeception
Other
46 stars 28 forks source link

Error Constant already defined #28

Closed ghost closed 8 years ago

ghost commented 8 years ago

When I run all suites at once (vendor/bin/codecept run), I get a PHPUnit_Framework_Exception about constant already defined. First phpunit complainded about all constants defined in config/path.php, then I wrapped all of them inside 'conditionals definitions'. But the error keeps going through every constant.

When I run one suit at time, I have no problems.

valentinarho commented 8 years ago

Try to change the row

require $root . '/config/bootstrap.php';

to

require_once $root . '/config/bootstrap.php';

in all bootstrap.php files located inside the specific tests folder e.g. "Functional/bootstrap.php" or "Acceptance/bootstrap.php

jadb commented 8 years ago

@valentinarho mind opening a PR with your solution?

valentinarho commented 8 years ago

Done! PR #31. Hope it is the right solution to @vtfn problem!