Finish event tests
This commit is contained in:
@@ -45,6 +45,9 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
'CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent' => [
|
'CachetHQ\Cachet\Events\Incident\MaintenanceWasScheduledEvent' => [
|
||||||
'CachetHQ\Cachet\Handlers\Events\Incident\SendMaintenanceEmailNotificationHandler',
|
'CachetHQ\Cachet\Handlers\Events\Incident\SendMaintenanceEmailNotificationHandler',
|
||||||
],
|
],
|
||||||
|
'CachetHQ\Cachet\Events\Invite\InviteWasClaimedEvent' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
'CachetHQ\Cachet\Events\Metric\MetricPointWasAddedEvent' => [
|
'CachetHQ\Cachet\Events\Metric\MetricPointWasAddedEvent' => [
|
||||||
//
|
//
|
||||||
],
|
],
|
||||||
@@ -66,6 +69,12 @@ class EventServiceProvider extends ServiceProvider
|
|||||||
'CachetHQ\Cachet\Events\Subscriber\SubscriberHasSubscribedEvent' => [
|
'CachetHQ\Cachet\Events\Subscriber\SubscriberHasSubscribedEvent' => [
|
||||||
'CachetHQ\Cachet\Handlers\Events\Subscriber\SendSubscriberVerificationEmailHandler',
|
'CachetHQ\Cachet\Handlers\Events\Subscriber\SendSubscriberVerificationEmailHandler',
|
||||||
],
|
],
|
||||||
|
'CachetHQ\Cachet\Events\Subscriber\SubscriberHasUnsubscribedEvent' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
|
'CachetHQ\Cachet\Events\Subscriber\SubscriberHasVerifiedEvent' => [
|
||||||
|
//
|
||||||
|
],
|
||||||
'CachetHQ\Cachet\Events\User\UserWasAddedEvent' => [
|
'CachetHQ\Cachet\Events\User\UserWasAddedEvent' => [
|
||||||
//
|
//
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?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\Events\Invite;
|
||||||
|
|
||||||
|
use CachetHQ\Cachet\Events\Invite\InviteWasClaimedEvent;
|
||||||
|
use CachetHQ\Cachet\Models\Invite;
|
||||||
|
|
||||||
|
class InviteWasClaimedEventTest extends AbstractInviteEventTestCase
|
||||||
|
{
|
||||||
|
protected function objectHasHandlers()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getObjectAndParams()
|
||||||
|
{
|
||||||
|
$params = ['invite' => new Invite()];
|
||||||
|
$object = new InviteWasClaimedEvent($params['invite']);
|
||||||
|
|
||||||
|
return compact('params', 'object');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?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\Events\Subscriber;
|
||||||
|
|
||||||
|
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasSubscribedEvent;
|
||||||
|
use CachetHQ\Cachet\Models\Subscriber;
|
||||||
|
|
||||||
|
class SubscriberHasSubscribedEventTest extends AbstractSubscriberEventTestCase
|
||||||
|
{
|
||||||
|
protected function objectHasHandlers()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getObjectAndParams()
|
||||||
|
{
|
||||||
|
$params = ['subscriber' => new Subscriber()];
|
||||||
|
$object = new SubscriberHasSubscribedEvent($params['subscriber']);
|
||||||
|
|
||||||
|
return compact('params', 'object');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?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\Events\Subscriber;
|
||||||
|
|
||||||
|
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasUnsubscribedEvent;
|
||||||
|
use CachetHQ\Cachet\Models\Subscriber;
|
||||||
|
|
||||||
|
class SubscriberHasUnsubscribedEventTest extends AbstractSubscriberEventTestCase
|
||||||
|
{
|
||||||
|
protected function objectHasHandlers()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getObjectAndParams()
|
||||||
|
{
|
||||||
|
$params = ['subscriber' => new Subscriber()];
|
||||||
|
$object = new SubscriberHasUnsubscribedEvent($params['subscriber']);
|
||||||
|
|
||||||
|
return compact('params', 'object');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?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\Events\Subscriber;
|
||||||
|
|
||||||
|
use CachetHQ\Cachet\Events\Subscriber\SubscriberHasVerifiedEvent;
|
||||||
|
use CachetHQ\Cachet\Models\Subscriber;
|
||||||
|
|
||||||
|
class SubscriberHasVerifiedEventTest extends AbstractSubscriberEventTestCase
|
||||||
|
{
|
||||||
|
protected function objectHasHandlers()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function getObjectAndParams()
|
||||||
|
{
|
||||||
|
$params = ['subscriber' => new Subscriber()];
|
||||||
|
$object = new SubscriberHasVerifiedEvent($params['subscriber']);
|
||||||
|
|
||||||
|
return compact('params', 'object');
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user