Finish event tests
This commit is contained in:
31
tests/Events/Invite/InviteWasClaimedEventTest.php
Normal file
31
tests/Events/Invite/InviteWasClaimedEventTest.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
31
tests/Events/Subscriber/SubscriberHasSubscribedEventTest.php
Normal file
31
tests/Events/Subscriber/SubscriberHasSubscribedEventTest.php
Normal file
@@ -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');
|
||||
}
|
||||
}
|
||||
31
tests/Events/Subscriber/SubscriberHasVerifiedEventTest.php
Normal file
31
tests/Events/Subscriber/SubscriberHasVerifiedEventTest.php
Normal file
@@ -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