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

Request might not exist yet in testing env #81

Merged
merged 1 commit into from Jul 19, 2017

Conversation

x-yuri
Copy link
Contributor

@x-yuri x-yuri commented Feb 9, 2017

Fixes #70

Changes proposed in this pull request:

  • create provider late, to make sure request has been created

@faustbrian
Copy link
Contributor

faustbrian commented Feb 9, 2017

Travis is now failing, please fix the tests before I merge it.

@x-yuri
Copy link
Contributor Author

x-yuri commented Feb 10, 2017

I get many more failures locally. That is I get failures without my changes (tag: v2.2.1), can you explain that?

I'm running php-7.1.1, if anything.

FFF.........EEEE............                                      28 / 28 (100%)

Time: 215 ms, Memory: 10.00MB

There were 4 errors:

1) SocialiteProviders\Manager\Test\OAuth2ProviderTest::it_allows_the_config_to_be_retrieved_from_the_services_array
BadMethodCallException: Method Mockery_5_SocialiteProviders_Manager_Test_Stubs_OAuth2ProviderStub::setConfig() does not exist on this mock object

/home/yuri/prj/Manager/src/SocialiteWasCalled.php:131
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:84
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:53
/home/yuri/prj/Manager/tests/OAuth2ProviderTest.php:98

2) SocialiteProviders\Manager\Test\OAuth2ProviderTest::it_allows_a_custom_config_to_be_passed_dynamically
Error: Call to undefined method SocialiteProviders\Manager\Test\Stubs\OAuth2ProviderStub::config()

/home/yuri/prj/Manager/tests/OAuth2ProviderTest.php:108

3) SocialiteProviders\Manager\Test\OAuth2ProviderTest::it_retrieves_from_the_config_if_no_config_is_provided
BadMethodCallException: Method Mockery_5_SocialiteProviders_Manager_Test_Stubs_OAuth2ProviderStub::setConfig() does not exist on this mock object

/home/yuri/prj/Manager/src/SocialiteWasCalled.php:131
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:84
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:53
/home/yuri/prj/Manager/tests/OAuth2ProviderTest.php:140

4) SocialiteProviders\Manager\Test\OAuth2ProviderTest::it_should_build_a_provider_and_extend_socialite
BadMethodCallException: Method Mockery_5_SocialiteProviders_Manager_Test_Stubs_OAuth2ProviderStub::setConfig() does not exist on this mock object

/home/yuri/prj/Manager/src/SocialiteWasCalled.php:131
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:84
/home/yuri/prj/Manager/src/SocialiteWasCalled.php:53
/home/yuri/prj/Manager/tests/OAuth2ProviderTest.php:177

--

There were 3 failures:

1) SocialiteProviders\Manager\Test\ConfigRetrieverTest::it_throws_if_there_is_a_problem_with_the_env_config
Failed asserting that exception of type "Error" matches expected exception "\SocialiteProviders\Manager\Exception\MissingConfigException". Message was: "Call to undefined function SocialiteProviders\Manager\Helpers\app()" at
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:155
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:47
/home/yuri/prj/Manager/tests/ConfigRetrieverTest.php:22
.

2) SocialiteProviders\Manager\Test\ConfigRetrieverTest::it_throws_if_there_is_a_problem_with_the_services_config
Failed asserting that exception of type "Error" matches expected exception "\SocialiteProviders\Manager\Exception\MissingConfigException". Message was: "Call to undefined function SocialiteProviders\Manager\Helpers\app()" at
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:181
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:66
/home/yuri/prj/Manager/tests/ConfigRetrieverTest.php:35
.

3) SocialiteProviders\Manager\Test\ConfigRetrieverTest::it_throws_if_there_are_missing_items_in_the_services_config
Failed asserting that exception of type "Error" matches expected exception "\SocialiteProviders\Manager\Exception\MissingConfigException". Message was: "Call to undefined function SocialiteProviders\Manager\Helpers\app()" at
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:181
/home/yuri/prj/Manager/src/Helpers/ConfigRetriever.php:66
/home/yuri/prj/Manager/tests/ConfigRetrieverTest.php:48
.

ERRORS!
Tests: 28, Assertions: 35, Errors: 4, Failures: 3.

@faustbrian
Copy link
Contributor

faustbrian commented Feb 11, 2017

If I run the tests on my local machine without your changes all tests pass on the latest release, as soon as I add your changes a bunch of errors pop up.

Also on a sidenote, there will be no more 2.* releases tagged so all changes should be made on 3.*.

@x-yuri
Copy link
Contributor Author

x-yuri commented Mar 6, 2017

Sorry, it takes so long. I don't have much time, but still I wanted to find out why I have extra tests failing.

From what I can see, Travis (or probably GitHub) first merges my PR into master and only then [Travis] runs tests. Correct me if I'm wrong. That might explain why I have more tests failing. I ran the tests being at my branch (no pulling changes from your repo and rebasing my changes onto master).

But I just pulled changes from your repo and tried to run tests being at f57877e (v3.0.4), and I still have one test failing. I'll try to look into it now.

UPD I see, forgot to update dependencies.

@x-yuri
Copy link
Contributor Author

x-yuri commented Mar 6, 2017

@faustbrian check if it's okay, please

@faustbrian faustbrian merged commit 9c45ab1 into SocialiteProviders:master Jul 19, 2017
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