Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use better autoloading for test files#229

Merged
Nyholm merged 7 commits into
async-aws:masterfrom
Nyholm:autoload-test-files
Feb 28, 2020
Merged

Use better autoloading for test files#229
Nyholm merged 7 commits into
async-aws:masterfrom
Nyholm:autoload-test-files

Conversation

@Nyholm
Copy link
Copy Markdown
Member

@Nyholm Nyholm commented Feb 27, 2020

No description provided.

Comment thread composer.json Outdated
Comment thread src/Core/composer.json Outdated
"psr-4": {
"AsyncAws\\Core\\": ""
},
"files": ["Test/PHPUnitTestCase.php"],
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think it's only needed in Generator (+ Aws because of subtreesplit) when using Reflection to change the source code of a Test.
When running test, there is no issue, the Class PHPUnit\TestCase is well loaded.

People using Core + our testCase should not be impacted

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've updated the solution now. I pretty much only moved DummyTest to a new file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

do not missunderstand my comment. I liked using composer to load the alias.

I was just worried about loading it for everybody with "production" settings.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah. It was.

I changed that so it is only loaded when the class is used.

@Nyholm Nyholm force-pushed the autoload-test-files branch from 72582e9 to 97a43db Compare February 27, 2020 12:37
@Nyholm
Copy link
Copy Markdown
Member Author

Nyholm commented Feb 27, 2020

The branch aliases are unrelated. I made them so the build is green

@Nyholm Nyholm merged commit dace083 into async-aws:master Feb 28, 2020
@Nyholm Nyholm deleted the autoload-test-files branch May 5, 2020 21:11
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