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
Set Fixture::$persistFixtureData if PERSIST_FIXTURE_DATA env var is set #12672
Conversation
👍 |
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 changes breaks the current behavior as changes from outside of this class might get overridden. We can either change it the way I suggested in the comment, or we need to change the way UI tests are set up. With your changes the parameter --persist-fixture-data
does not work anymore
tests/PHPUnit/Framework/Fixture.php
Outdated
|
||
private function initFromEnvVars() | ||
{ | ||
$this->persistFixtureData = (bool)getenv(self::PERSIST_FIXTURE_DATA_ENV); |
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'd suggest to change that to $this->persistFixtureData = $this->persistFixtureData || (bool)getenv(self::PERSIST_FIXTURE_DATA_ENV);
so is stays true if that was set from outside already
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.
👍 will go w/ this approach, nice catch!
…sed to speed system test running.
34fe874
to
8098ba3
Compare
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.
--persists-fixture-data
works correctly for UI tests again, so guess should be good to merge now.
…sed to speed system test running. (matomo-org#12672)
Useful for quickly running system tests when you have to run them over and over again.