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

Fix warning in SearchIndexSubscriberTest #1991

Merged
merged 2 commits into from
Jul 26, 2020

Conversation

fritzmg
Copy link
Contributor

@fritzmg fritzmg commented Jul 25, 2020

Q A
Fixed issues -
Docs PR or issue -

Fixes the following warning that currently appears when running any test:

Warning: array_reverse() expects parameter 1 to be array, null given in vendor\contao\contao\vendor\symfony\http-client\Exception\HttpExceptionTrait.php on line 34

@fritzmg fritzmg added the bug label Jul 25, 2020
@fritzmg fritzmg added this to the 4.10 milestone Jul 25, 2020
@fritzmg fritzmg requested a review from a team July 25, 2020 11:26
@fritzmg fritzmg self-assigned this Jul 25, 2020
ausi
ausi previously approved these changes Jul 25, 2020
Copy link
Member

@ausi ausi left a comment

Choose a reason for hiding this comment

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

Tested it locally and the warnings disappered 🎉

@m-vo
Copy link
Member

m-vo commented Jul 25, 2020

Very good, this was bugging me all the time. 🙂

@leofeyer
Copy link
Member

Does this not affect Contao 4.9 as well?

@fritzmg
Copy link
Contributor Author

fritzmg commented Jul 25, 2020

Does this not affect Contao 4.9 as well?

Yeah, I'll rebase.

@fritzmg fritzmg force-pushed the fix/search-index-subscriber-test-warning branch from 4a37436 to fab4608 Compare July 25, 2020 12:12
@fritzmg fritzmg changed the base branch from 4.10 to 4.9 July 25, 2020 12:13
@fritzmg fritzmg requested a review from leofeyer July 25, 2020 12:13
@fritzmg fritzmg modified the milestones: 4.10, 4.9 Jul 25, 2020
@fritzmg fritzmg changed the base branch from 4.9 to 4.8 July 25, 2020 14:20
@fritzmg fritzmg changed the base branch from 4.8 to 4.9 July 25, 2020 14:21
@leofeyer leofeyer merged commit 2026082 into contao:4.9 Jul 26, 2020
@leofeyer
Copy link
Member

Thank you @fritzmg.

@leofeyer
Copy link
Member

Hm, now the unit test triggers a warning:

1) Warning
The data provider specified for Contao\CoreBundle\Tests\Crawl\Escargot\Subscriber\SearchIndexSubscriberTest::testOnHttpException is invalid.
PHPUnit\Framework\ExpectationFailedException: Expectation failed for method name is "getInfo" when invoked zero or more times
Parameter 0 for invocation Symfony\Contracts\HttpClient\ResponseInterface::getInfo('http_code') does not match expected value.
Failed asserting that two strings are equal.
contao/managed-edition/vendor/contao/contao/vendor/symfony/http-client/Exception/HttpExceptionTrait.php:28
contao/managed-edition/vendor/contao/contao/core-bundle/tests/Crawl/Escargot/Subscriber/SearchIndexSubscriberTest.php:439

leofeyer added a commit that referenced this pull request Jul 26, 2020
Description
-----------

See #1991 (comment). Needs to be backported to Contao 4.9.

Commits
-------

d43d6a4 Fix the search index subscriber test
leofeyer added a commit to contao/core-bundle that referenced this pull request Jul 26, 2020
Description
-----------

See contao/contao#1991 (comment). Needs to be backported to Contao 4.9.

Commits
-------

d43d6a45 Fix the search index subscriber test
@fritzmg fritzmg deleted the fix/search-index-subscriber-test-warning branch October 24, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants