LionsAd / drupal_ti

Drupal - Travis Integration
82 stars 37 forks source link

Running phpunit tests when using a root vendor #44

Closed bojanz closed 9 years ago

bojanz commented 9 years ago

I've just committed a change to composer_manager that makes it use the root vendor directory instead of the core one: https://www.drupal.org/node/2452781#comment-10240975

Having both vendor/ and core/vendor creates a weird situation for phpunit. I can run phpunit from the root using

./vendor/bin/phpunit -c core

But I can no longer run phpunit from core/vendor/bin/phpunit, because it ends up including both autoloaders somehow, and crashes with:

PHP Fatal error: Cannot redeclare composerRequireDrupal8() (previously declared in >/home/travis/build/commerceguys/drupal-8/drupal/core/vendor/composer/autoload_real.php:56) in >/home/travis/build/commerceguys/drupal-8/drupal/vendor/composer/autoload_real.php on line 55

This is problematic because simpletest hardcodes the core phpunit, making the build fail. Not yet sure what the proper fix is, wanted to report it first.

bojanz commented 9 years ago

This is a core bug, described in: https://www.drupal.org/node/2554849

Keeping this open for now, for visibility, now that builds with composer_manager are broken.

bojanz commented 9 years ago

Fixed in core.