-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Follow up: #94 Merge config from vendor #98
Conversation
Still have some problem with testing the config is there before- and after 'booting' the ServiceProvider. The config seems to be there all the time, already! I try some more. |
I think this includes everything you want to :)
Is this ready to merge? |
{ | ||
\File::delete(config_path('elasticsearch.php')); |
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 think I know better way to test it.
Revert your changes in this test. We don't need new test method
Delete this file https://github.com/matchish/laravel-scout-elasticsearch/blob/master/tests/laravel/config/elasticsearch.php
After it a lot of tests should fail
Add your code $this->mergeConfigFrom(__DIR__.'/../config/elasticsearch.php
it should fix them because of now we load config from vendor package
And move this code to the end of the test for cleanup
File::delete(config_path('elasticsearch.php'))
No, I was wrong we need two tests
And we should override this method in our test class
And unset elasticsearch config |
The thing is, I think config keys cannot be unset at runtime. This is a problem, because a lot of testing needs the config set in
|
In cb02255 you see I moved the config needed for the Elastiscsearch integrations tests to it's base class. Now the config is not loaded already in |
Great contribution! Thanks) |
At my first attempt I forgot to begin with a new branch and got in trouble ;) Here is the second attempt.
Closes #84