Added more service provider tests

This commit is contained in:
Graham Campbell
2016-05-28 16:19:33 +01:00
parent 3a1042e6ae
commit 1c10cba5fc
6 changed files with 130 additions and 0 deletions

View File

@@ -12,6 +12,8 @@
namespace CachetHQ\Tests\Cachet\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Cachet\Dates\DateFactory;
use CachetHQ\Cachet\GitHub\Release;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
@@ -22,4 +24,14 @@ use CachetHQ\Tests\Cachet\AbstractTestCase;
class AppServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
public function testDateFactoryIsInjectable()
{
$this->assertIsInjectable(DateFactory::class);
}
public function testReleaseIsInjectable()
{
$this->assertIsInjectable(Release::class);
}
}

View File

@@ -0,0 +1,25 @@
<?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\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
* This is the composer service provider test class.
*
* @author Graham Campbell <graham@alt-three.com>
*/
class ComposerServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
}

View File

@@ -0,0 +1,37 @@
<?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\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Cachet\Settings\Cache;
use CachetHQ\Cachet\Settings\Repository;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
* This is the config service provider test class.
*
* @author Graham Campbell <graham@alt-three.com>
*/
class ConfigServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
public function testCacheIsInjectable()
{
$this->assertIsInjectable(Cache::class);
}
public function testRepositoryIsInjectable()
{
$this->assertIsInjectable(Repository::class);
}
}

View File

@@ -0,0 +1,25 @@
<?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\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
* This is the console service provider test class.
*
* @author Graham Campbell <graham@alt-three.com>
*/
class ConsoleServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
}

View File

@@ -12,6 +12,7 @@
namespace CachetHQ\Tests\Cachet\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Cachet\Repositories\Metric\MetricRepository;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
@@ -22,4 +23,9 @@ use CachetHQ\Tests\Cachet\AbstractTestCase;
class RepositoryServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
public function testMetricRepositoryIsInjectable()
{
$this->assertIsInjectable(MetricRepository::class);
}
}

View File

@@ -0,0 +1,25 @@
<?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\Foundation\Providers;
use AltThree\TestBench\ServiceProviderTrait;
use CachetHQ\Tests\Cachet\AbstractTestCase;
/**
* This is the route service provider test class.
*
* @author Graham Campbell <graham@alt-three.com>
*/
class RouteServiceProviderTest extends AbstractTestCase
{
use ServiceProviderTrait;
}