-
Notifications
You must be signed in to change notification settings - Fork 196
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
Feature test inflections #2187
base: 3.x
Are you sure you want to change the base?
Feature test inflections #2187
Conversation
…terminus into feature/3.x-unit-tests
perl -pi -e 's/->setExpectedException\((\w+::class), (.+)\);$/->expectException(\1);\n \$this->expectExceptionMessage($2);/;'
…terminus into feature/3.x-unit-tests
"curl -LSs https://box-project.github.io/box2/installer.php | php", | ||
"mkdir -p tools", | ||
"mv -f box.phar tools/box" | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put this stuff here while trying to get the unit tests to run.. but I don't know that it's actually needed for them
To run the functional tests: | ||
|
||
1. If you need the basics (php, git, direnv, etc): `brew bundle install` | ||
2. For code coverage: `pecl install pcov` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for what it's worth, this was required for them to run, at least when I first got them to run and I can't see why it would have changed.
|
||
1. If you need the basics (php, git, direnv, etc): `brew bundle install` | ||
2. For code coverage: `pecl install pcov` | ||
3. Prepare a new test site, e.g. make a new multidev in ci-terminus-composer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tests currently have the environment hard-coded in most cases, e.g. LocalCommandsTest.php line 64, and line 81 as well. In the tests/Functional directory, when I run ack 'live' | grep 'live' | wc -l gives returns 29, and skimming the results, those matches look like the environment name in every case.
So even if you create a multidev, most of the time it's going to run against the hard-coded environment.
Obviously this needs to be fixed.
README.md
Outdated
2. For code coverage: `pecl install pcov` | ||
3. Prepare a new test site, e.g. make a new multidev in ci-terminus-composer | ||
4. Copy .env.dist to .env and make an .envrc to include it with `dotenv`, or copy .env.dist to .envrc and add `export` at the head of each line. Customize values as needed. Use `direnv allow` to enable automatic loading of environment variables needed for tests. | ||
5. Run `composer test:short` to run the short functional tests, or `composer test:long` to run everything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
composer test:long
runs only the long-running tests, i.e. it won't run the short
tests. This was so we could run all tests by running both commands separately. Until I changed test:functional
to run both short and long tests, late last week, it ran all the tests, including the un-implemented ones which still fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pushed update for this.
See how the changes made for the unit tests fare under the functional tests.