You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently ChannelManager implements DispatcherContract and FactoryContract
use Illuminate\Contracts\Notifications\Dispatcher as DispatcherContract;
use Illuminate\Contracts\Notifications\Factory as FactoryContract;
If inject it in __construct(ChannelManager $manager) and cover implementation with test which mocks Notification implementation using Notification::fake() PHP will throw exception that NotificationFake is not compatible with requested constructor.
We can inject DispatcherContract but at the same time DispatcherContract doesn't describe implemented locale() method on ChannelManager.php.
It would be very useful to introduce Contract which will implement both DispatcherContract and FactoryContract so we will be able to implement it on mocked and basic ChannelManager.
Let me know if it makes sense, if so i will be happy to make PR for this.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently
ChannelManager
implementsDispatcherContract
andFactoryContract
If inject it in
__construct(ChannelManager $manager)
and cover implementation with test which mocks Notification implementation usingNotification::fake()
PHP will throw exception thatNotificationFake
is not compatible with requested constructor.We can inject
DispatcherContract
but at the same timeDispatcherContract
doesn't describe implementedlocale()
method onChannelManager.php
.It would be very useful to introduce Contract which will implement both
DispatcherContract
andFactoryContract
so we will be able to implement it on mocked and basic ChannelManager.Let me know if it makes sense, if so i will be happy to make PR for this.
Beta Was this translation helpful? Give feedback.
All reactions