Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move phpunit tests (#295) #313

Merged
merged 14 commits into from
Aug 20, 2016
Merged

Move phpunit tests (#295) #313

merged 14 commits into from
Aug 20, 2016

Conversation

pixlkat
Copy link
Contributor

@pixlkat pixlkat commented Aug 17, 2016

No description provided.

@@ -21,7 +21,8 @@
public function __construct($name = NULL, array $data = array(), $data_name = '') {

parent::__construct($name, $data, $data_name);
$this->projectDirectory = dirname(dirname(dirname(__DIR__)));
$directory = realpath(dirname(__FILE__) . '/../../../');
Copy link
Contributor

@grasmash grasmash Aug 18, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is likely failing because of how the tests are called. They are intended to be called from the child blt-project, but they are being called from the parent blt here:
https://github.com/acquia/blt/blob/8.x/.travis.yml#L90

We'll want to tag these tests with a group like @blt-project. Then, we can run test in two sets:

- cd ../blt-project
- phpunit tests/phpunit --group blt-project
- cd ../blt 
- phpunit tests/phpunit --exclude-group blt-project

The blt-project tests can then rely on a $this->project directory variable that refers to ../../../../../../ given that the actual TestBase will live in vendor/acquia/blt/tests/phpunit/src.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused here - the tests themselves all now live in vendor/acquia/blt/phpunit/src. Running phpunit tests/phpunit from the blt-project directory does not find the tests that live in blt.

@@ -84,10 +84,12 @@ script:
- blt deploy:build
# Add Drupal VM config to repo.
- blt vm:init
# Run the 'blt-project' phpunit tests.
- phpunit vendor/acquia/blt/tests/phpunit --group blt-project
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't these get executed already by the ci:build:validate:test target run in blt-project?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, they do appear to be run, I missed them when inspecting the test output earlier. I'll take that back out.

@grasmash grasmash merged commit 827af6e into acquia:8.x Aug 20, 2016
@pixlkat pixlkat deleted the move-phpunit-tests branch August 22, 2016 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants