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

Skip to content

[Mailer] Added messenger to dev dependencies #33480

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

Merged
merged 1 commit into from
Sep 5, 2019

Conversation

derrabus
Copy link
Member

@derrabus derrabus commented Sep 5, 2019

Q A
Branch? 4.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

PR #33454 introduced a new test case that mocks the MessageBusInterface from the messenger component. This makes the tests suite fail on travis because PHPUnit refuses to create a mock for an interface that does not exist.

There was 1 failure:

1) Symfony\Component\Mailer\Tests\MailerTest::testSendingRawMessages

Failed asserting that exception of type "PHPUnit\Framework\MockObject\RuntimeException" matches expected exception "Symfony\Component\Mailer\Exception\LogicException". Message was: "Cannot stub or mock class or interface "Symfony\Component\Messenger\MessageBusInterface" which does not exist" at

/home/travis/build/symfony/symfony/src/Symfony/Component/Mailer/Tests/MailerTest.php:28

This PR fixes the test by adding the Messenger component to Mailer's dev dependencies.

@nicolas-grekas
Copy link
Member

Thank you @derrabus.

nicolas-grekas added a commit that referenced this pull request Sep 5, 2019
This PR was merged into the 4.4 branch.

Discussion
----------

[Mailer] Added messenger to dev dependencies

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

PR #33454 introduced a new test case that mocks the `MessageBusInterface` from the messenger component. This makes the tests suite fail on travis because PHPUnit refuses to create a mock for an interface that does not exist.

```
There was 1 failure:

1) Symfony\Component\Mailer\Tests\MailerTest::testSendingRawMessages

Failed asserting that exception of type "PHPUnit\Framework\MockObject\RuntimeException" matches expected exception "Symfony\Component\Mailer\Exception\LogicException". Message was: "Cannot stub or mock class or interface "Symfony\Component\Messenger\MessageBusInterface" which does not exist" at

/home/travis/build/symfony/symfony/src/Symfony/Component/Mailer/Tests/MailerTest.php:28
```

This PR fixes the test by adding the Messenger component to Mailer's dev dependencies.

Commits
-------

248f082 [Mailer] Added messenger to dev dependencies.
@nicolas-grekas nicolas-grekas merged commit 248f082 into symfony:4.4 Sep 5, 2019
@derrabus derrabus deleted the bugfix/failing-mailer-tests branch September 5, 2019 15:53
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.4 Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants