-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2011 from CachetHQ/event-tests
Added missing event tests
- Loading branch information
Showing
9 changed files
with
324 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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 changes: 36 additions & 0 deletions
36
tests/Bus/Events/Incident/IncidentWasReportedEventTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
tests/Bus/Events/Incident/MaintenanceWasScheduledEventTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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 changes: 36 additions & 0 deletions
36
tests/Bus/Events/Metric/MetricPointWasRemovedEventTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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 changes: 36 additions & 0 deletions
36
tests/Bus/Events/Metric/MetricPointWasUpdatedEventTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <[email protected]> | ||
*/ | ||
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'); | ||
} | ||
} |