wip
This commit is contained in:
41
tests/Providers/EventServiceProviderTest.php
Normal file
41
tests/Providers/EventServiceProviderTest.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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\Providers;
|
||||
|
||||
use AltThree\TestBench\EventServiceProviderTrait;
|
||||
use CachetHQ\Tests\Cachet\AbstractTestCase;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use ReflectionClass;
|
||||
|
||||
/**
|
||||
* This is the event service provider test class.
|
||||
*
|
||||
* @author Graham Campbell <graham@alt-three.com>
|
||||
* @author James Brooks <james@alt-three.com>
|
||||
*/
|
||||
class EventServiceProviderTest extends AbstractTestCase
|
||||
{
|
||||
use EventServiceProviderTrait;
|
||||
|
||||
public function testIsAnEventServiceProvider()
|
||||
{
|
||||
$class = $this->getServiceProviderClass($this->app);
|
||||
|
||||
$reflection = new ReflectionClass($class);
|
||||
|
||||
$provider = new ReflectionClass(ServiceProvider::class);
|
||||
|
||||
$msg = "Expected class '$class' to be a service provider.";
|
||||
|
||||
$this->assertTrue($reflection->isSubclassOf($provider), $msg);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user