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

Feature test inflections #2187

Open
wants to merge 32 commits into
base: 3.x
Choose a base branch
from
Open

Conversation

greg-1-anderson
Copy link
Member

See how the changes made for the unit tests fare under the functional tests.

namespacebrian and others added 28 commits August 31, 2021 18:10
perl -pi -e 's/->setExpectedException\((\w+::class), (.+)\);$/->expectException(\1);\n        \$this->expectExceptionMessage($2);/;'
"curl -LSs https://box-project.github.io/box2/installer.php | php",
"mkdir -p tools",
"mv -f box.phar tools/box"
],
Copy link
Contributor

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`
Copy link
Contributor

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
Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

pushed update for this.

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.

None yet

2 participants