Rename incident bus
This commit is contained in:
@@ -12,17 +12,17 @@
|
||||
namespace CachetHQ\Tests\Cachet\Bus\Commands\Incident;
|
||||
|
||||
use AltThree\TestBench\CommandTrait;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\ReportIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Handlers\Commands\Incident\ReportIncidentCommandHandler;
|
||||
use CachetHQ\Cachet\Bus\Commands\Incident\CreateIncidentCommand;
|
||||
use CachetHQ\Cachet\Bus\Handlers\Commands\Incident\CreateIncidentCommandHandler;
|
||||
use CachetHQ\Tests\Cachet\AbstractTestCase;
|
||||
|
||||
/**
|
||||
* This is the add incident command test class.
|
||||
* This is the create incident command test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
*/
|
||||
class ReportIncidentCommandTest extends AbstractTestCase
|
||||
class CreateIncidentCommandTest extends AbstractTestCase
|
||||
{
|
||||
use CommandTrait;
|
||||
|
||||
@@ -42,7 +42,7 @@ class ReportIncidentCommandTest extends AbstractTestCase
|
||||
'template_vars' => [],
|
||||
];
|
||||
|
||||
$object = new ReportIncidentCommand(
|
||||
$object = new CreateIncidentCommand(
|
||||
$params['name'],
|
||||
$params['status'],
|
||||
$params['message'],
|
||||
@@ -66,6 +66,6 @@ class ReportIncidentCommandTest extends AbstractTestCase
|
||||
|
||||
protected function getHandlerClass()
|
||||
{
|
||||
return ReportIncidentCommandHandler::class;
|
||||
return CreateIncidentCommandHandler::class;
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,18 @@
|
||||
namespace CachetHQ\Tests\Cachet\Bus\Commands\IncidentUpdate;
|
||||
|
||||
use AltThree\TestBench\CommandTrait;
|
||||
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\ReportIncidentUpdateCommand;
|
||||
use CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate\ReportIncidentUpdateCommandHandler;
|
||||
use CachetHQ\Cachet\Bus\Commands\IncidentUpdate\CreateIncidentUpdateCommand;
|
||||
use CachetHQ\Cachet\Bus\Handlers\Commands\IncidentUpdate\CreateIncidentUpdateCommandHandler;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
use CachetHQ\Tests\Cachet\AbstractTestCase;
|
||||
|
||||
/**
|
||||
* This is the report incident update command test class.
|
||||
* This is the create incident update command test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class ReportIncidentUpdateCommandTest extends AbstractTestCase
|
||||
class CreateIncidentUpdateCommandTest extends AbstractTestCase
|
||||
{
|
||||
use CommandTrait;
|
||||
|
||||
@@ -35,7 +35,7 @@ class ReportIncidentUpdateCommandTest extends AbstractTestCase
|
||||
'message' => 'Foo',
|
||||
'user' => new User(),
|
||||
];
|
||||
$object = new ReportIncidentUpdateCommand($params['incident'], $params['status'], $params['message'], $params['user']);
|
||||
$object = new CreateIncidentUpdateCommand($params['incident'], $params['status'], $params['message'], $params['user']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
@@ -47,6 +47,6 @@ class ReportIncidentUpdateCommandTest extends AbstractTestCase
|
||||
|
||||
protected function getHandlerClass()
|
||||
{
|
||||
return ReportIncidentUpdateCommandHandler::class;
|
||||
return CreateIncidentUpdateCommandHandler::class;
|
||||
}
|
||||
}
|
||||
@@ -11,16 +11,16 @@
|
||||
|
||||
namespace CachetHQ\Tests\Cachet\Bus\Events\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasCreatedEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
/**
|
||||
* This is the incident was reported event test class.
|
||||
* This is the incident was created event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class IncidentWasReportedEventTest extends AbstractIncidentEventTestCase
|
||||
class IncidentWasCreatedEventTest extends AbstractIncidentEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
@@ -34,7 +34,7 @@ class IncidentWasReportedEventTest extends AbstractIncidentEventTestCase
|
||||
'incident' => new Incident(),
|
||||
'notify' => true,
|
||||
];
|
||||
$object = new IncidentWasReportedEvent($params['user'], $params['incident'], $params['notify']);
|
||||
$object = new IncidentWasCreatedEvent($params['user'], $params['incident'], $params['notify']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
Reference in New Issue
Block a user