Fix tests
This commit is contained in:
@@ -40,7 +40,7 @@ class ComponentStatusWasUpdatedEventTest extends AbstractComponentEventTestCase
|
||||
$this->app['events']->fire(new ComponentStatusWasUpdatedEvent($component, 1, 2));
|
||||
|
||||
$this->seeMessageFor($subscriber->email);
|
||||
$this->seeMessageWithSubject(trans('cachet.subscriber.email.component.subject'));
|
||||
$this->seeMessageWithSubject(trans('notifications.component.status_update.subject'));
|
||||
|
||||
$message = $this->getMailer()->lastMessage();
|
||||
|
||||
|
||||
@@ -28,7 +28,10 @@ class IncidentWasReportedEventTest extends AbstractIncidentEventTestCase
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['incident' => new Incident()];
|
||||
$params = [
|
||||
'incident' => new Incident(),
|
||||
'notify' => true,
|
||||
];
|
||||
$object = new IncidentWasReportedEvent($params['incident']);
|
||||
|
||||
return compact('params', 'object');
|
||||
|
||||
40
tests/Bus/Events/User/UserAcceptedInviteEventTest.php
Normal file
40
tests/Bus/Events/User/UserAcceptedInviteEventTest.php
Normal file
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Cachet.
|
||||
*
|
||||
* (c) Alt Three Services Limited
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace CachetHQ\Tests\Cachet\Bus\Events\User;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\User\UserAcceptedInviteEvent;
|
||||
use CachetHQ\Cachet\Models\Invite;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
/**
|
||||
* This is the user accepted invite event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class UserAcceptedInviteEventTest extends AbstractUserEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = [
|
||||
'user' => new User(),
|
||||
'invite' => new Invite(),
|
||||
];
|
||||
$object = new UserAcceptedInviteEvent($params['user'], $params['invite']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user