Added beacon events
This commit is contained in:
31
tests/Bus/Events/Beacon/AbstractBeaconEventTestCase.php
Normal file
31
tests/Bus/Events/Beacon/AbstractBeaconEventTestCase.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\Bus\Events\Beacon;
|
||||
|
||||
use AltThree\TestBench\EventTrait;
|
||||
use CachetHQ\Cachet\Bus\Events\Beacon\BeaconEventInterface;
|
||||
use CachetHQ\Tests\Cachet\AbstractTestCase;
|
||||
|
||||
/**
|
||||
* This is the abstract beacon event test case.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
abstract class AbstractBeaconEventTestCase extends AbstractTestCase
|
||||
{
|
||||
use EventTrait;
|
||||
|
||||
protected function getEventInterfaces()
|
||||
{
|
||||
return [BeaconEventInterface::class];
|
||||
}
|
||||
}
|
||||
35
tests/Bus/Events/Beacon/BeaconFailedToSendEventTest.php
Normal file
35
tests/Bus/Events/Beacon/BeaconFailedToSendEventTest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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\Beacon;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Beacon\BeaconFailedToSendEvent;
|
||||
|
||||
/**
|
||||
* This is the beacon was sent event test.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class BeaconFailedToSendEventTest extends AbstractBeaconEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = [];
|
||||
$object = new BeaconFailedToSendEvent();
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
35
tests/Bus/Events/Beacon/BeaconWasSentEventTest.php
Normal file
35
tests/Bus/Events/Beacon/BeaconWasSentEventTest.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?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\Beacon;
|
||||
|
||||
use CachetHQ\Cachet\Bus\Events\Beacon\BeaconWasSentEvent;
|
||||
|
||||
/**
|
||||
* This is the beacon was sent event test.
|
||||
*
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class BeaconWasSentEventTest extends AbstractBeaconEventTestCase
|
||||
{
|
||||
protected function objectHasHandlers()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
protected function getObjectAndParams()
|
||||
{
|
||||
$params = [];
|
||||
$object = new BeaconWasSentEvent();
|
||||
|
||||
return compact('params', 'object');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user