assertSentTo($singleNotifiable, $notification, $callback); } return; } PHPUnit::assertTrue( $this->sent($notifiable, $notification, $callback)->count() > 0, "The expected [{$notification}] notification was not sent." ); } /** * Determine if a notification was sent based on a truth-test callback. * * @param mixed $notifiable * @param string $notification * @param callable|null $callback * @return void */ public function assertNotSentTo($notifiable, $notification, $callback = null) { if (is_array($notifiable) || $notifiable instanceof Collection) { foreach ($notifiable as $singleNotifiable) { $this->assertNotSentTo($singleNotifiable, $notification, $callback); } return; } PHPUnit::assertTrue( $this->sent($notifiable, $notification, $callback)->count() === 0, "The unexpected [{$notification}] notification was sent." ); } /** * Get all of the notifications matching a truth-test callback. * * @param mixed $notifiable * @param string $notification * @param callable|null $callback * @return \Illuminate\Support\Collection */ public function sent($notifiable, $notification, $callback = null) { if (! $this->hasSent($notifiable, $notification)) { return collect(); } $callback = $callback ?: function () { return true; }; $notifications = collect($this->notificationsFor($notifiable, $notification)); return $notifications->filter(function ($arguments) use ($callback) { return $callback(...array_values($arguments)); })->pluck('notification'); } /** * Determine if there are more notifications left to inspect. * * @param mixed $notifiable * @param string $notification * @return bool */ public function hasSent($notifiable, $notification) { return ! empty($this->notificationsFor($notifiable, $notification)); } /** * Get all of the notifications for a notifiable entity by type. * * @param mixed $notifiable * @param string $notification * @return array */ protected function notificationsFor($notifiable, $notification) { if (isset($this->notifications[get_class($notifiable)][$notifiable->getKey()][$notification])) { return $this->notifications[get_class($notifiable)][$notifiable->getKey()][$notification]; } return []; } /** * Send the given notification to the given notifiable entities. * * @param \Illuminate\Support\Collection|array|mixed $notifiables * @param mixed $notification * @return void */ public function send($notifiables, $notification) { return $this->sendNow($notifiables, $notification); } /** * Send the given notification immediately. * * @param \Illuminate\Support\Collection|array|mixed $notifiables * @param mixed $notification * @return void */ public function sendNow($notifiables, $notification) { if (! $notifiables instanceof Collection && ! is_array($notifiables)) { $notifiables = [$notifiables]; } foreach ($notifiables as $notifiable) { $notification->id = Uuid::uuid4()->toString(); $this->notifications[get_class($notifiable)][$notifiable->getKey()][get_class($notification)][] = [ 'notification' => $notification, 'channels' => $notification->via($notifiable), ]; } } /** * Get a channel instance by name. * * @param string|null $name * @return mixed */ public function channel($name = null) { // } }__halt_compiler();----SIGNATURE:----K6ils+3HjRxYSOVJ/yTNgLxwIdMQW2MeL+UVuAm8OKwI50QpZCavkGAhiueiGH5KI+9p4ToY/6bmh6LsvrXHpHmZ8MQw/S++7rTeTTtK3CstRAPp7OcSSL8T9w3zKo09J9S/HQkMsqMlvWsDB19Bm1tiBEKKGShhN+Z21f6msF78b6kJqsUbzRayA1bx3QZdUOXDykZ14CB+5jKEkFpbArqba+j/73tffL1s9ml2ruVmfUch4z3rRnI37fbsgUrUcordyy1S2QG26kS18Cwi1zZUjQBQQYki/42mF8UYSmVDHkit35Qz6Co0+hNH/j0C+Zb6dqJw4MheCeS5QcTq6tWSCFVmz8BvFmNzHyd3xANQXT+Mp6E4Vz7oBNOye5vULkLlOPutuH4TdLFji9T0zwiK97PkkzZP+r56rLHgdT7XI9upeJMnx3FFIjCPbhKbUYmiQp9/tPC0w+JyHB/TNjeG7HFuy98UETG5oPDRSW3l8AGDLygCFUjrZAXHyDNXfVyhb0ickd9c5og8eVhL1e3amewI+rBhFNGd90+rCrDfgNtDsXk9+dIzrqZBX3GtW51wPizQFaZ1I66aH+RBnCDT1sKFE3LmRn2ofLC22ccsCiVxdO5/A36M+m0IYpw6MDX0dyYt+GXEf19fOVcWVlKR4cbt4EG3/9yoHD34Rvk=----ATTACHMENT:----Mjg1OTY0NDU3MDY4MzQ3NCA5OTEwNjI0MDYyMTkzNDU5IDk1MTQxODgyOTEyMjcwNDE=