Added beacon events

This commit is contained in:
James Brooks
2016-08-04 11:06:27 +01:00
parent 1559e5945d
commit 9da17e7c15
8 changed files with 182 additions and 0 deletions

View 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];
}
}

View 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');
}
}

View 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');
}
}