Added missing event tests
This commit is contained in:
committed by
Graham Campbell
parent
4031c42958
commit
a2f8f4540e
36
tests/Bus/Events/Incident/IncidentWasRemovedEventTest.php
Normal file
36
tests/Bus/Events/Incident/IncidentWasRemovedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
/**
|
||||
* This is the incident was removed event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class IncidentWasRemovedEventTest extends AbstractIncidentEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['incident' => new Incident()];
|
||||
$object = new IncidentWasRemovedEvent($params['incident']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/Incident/IncidentWasReportedEventTest.php
Normal file
36
tests/Bus/Events/Incident/IncidentWasReportedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasReportedEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
/**
|
||||
* This is the incident was reported event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class IncidentWasReportedEventTest extends AbstractIncidentEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['incident' => new Incident()];
|
||||
$object = new IncidentWasReportedEvent($params['incident']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/Incident/IncidentWasUpdatedEventTest.php
Normal file
36
tests/Bus/Events/Incident/IncidentWasUpdatedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\IncidentWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
/**
|
||||
* This is the incident was updated event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class IncidentWasUpdatedEventTest extends AbstractIncidentEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['incident' => new Incident()];
|
||||
$object = new IncidentWasUpdatedEvent($params['incident']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
<?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\Incident;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Incident\MaintenanceWasScheduledEvent;
|
||||
use CachetHQ\Cachet\Models\Incident;
|
||||
|
||||
/**
|
||||
* This is the maintenance was scheduled event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class MaintenanceWasScheduledEventTest extends AbstractIncidentEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['incident' => new Incident()];
|
||||
$object = new MaintenanceWasScheduledEvent($params['incident']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/Metric/MetricPointWasAddedEventTest.php
Normal file
36
tests/Bus/Events/Metric/MetricPointWasAddedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasAddedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
/**
|
||||
* This is the metric point was added event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class MetricPointWasAddedEventTest extends AbstractMetricEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['metric' => new Metric()];
|
||||
$object = new MetricPointWasAddedEvent($params['metric']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/Metric/MetricPointWasRemovedEventTest.php
Normal file
36
tests/Bus/Events/Metric/MetricPointWasRemovedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
/**
|
||||
* This is the metric point was removed event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class MetricPointWasRemovedEventTest extends AbstractMetricEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['metric' => new Metric()];
|
||||
$object = new MetricPointWasRemovedEvent($params['metric']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/Metric/MetricPointWasUpdatedEventTest.php
Normal file
36
tests/Bus/Events/Metric/MetricPointWasUpdatedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\Metric;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Metric\MetricPointWasUpdatedEvent;
|
||||
use CachetHQ\Cachet\Models\Metric;
|
||||
|
||||
/**
|
||||
* This is the metric point was updated event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class MetricPointWasUpdatedEventTest extends AbstractMetricEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['metric' => new Metric()];
|
||||
$object = new MetricPointWasUpdatedEvent($params['metric']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/User/UserWasInvitedEventTest.php
Normal file
36
tests/Bus/Events/User/UserWasInvitedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\UserWasInvitedEvent;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
/**
|
||||
* This is the user was invited event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class UserWasInvitedEventTest extends AbstractUserEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['user' => new User()];
|
||||
$object = new UserWasInvitedEvent($params['user']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
36
tests/Bus/Events/User/UserWasRemovedEventTest.php
Normal file
36
tests/Bus/Events/User/UserWasRemovedEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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\UserWasRemovedEvent;
|
||||
use CachetHQ\Cachet\Models\User;
|
||||
|
||||
/**
|
||||
* This is the user was removed event test class.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class UserWasRemovedEventTest extends AbstractUserEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = ['user' => new User()];
|
||||
$object = new UserWasRemovedEvent($params['user']);
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user