Skip to content

Commit

Permalink
Adding more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arcanedev-maroc committed Jan 10, 2016
1 parent 65b0cee commit ca625a6
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Providers/CommandServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
class CommandServiceProvider extends ServiceProvider
{
/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
*/
| Main Functions
| ------------------------------------------------------------------------------------------------
*/
/**
* Register the service provider.
*/
Expand Down
67 changes: 67 additions & 0 deletions tests/Providers/CommandServiceProviderTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?php namespace Arcanesoft\Settings\Tests\Providers;

use Arcanesoft\Settings\Providers\CommandServiceProvider;
use Arcanesoft\Settings\Tests\TestCase;

/**
* Class CommandServiceProviderTest
*
* @package Arcanesoft\Settings\Tests\Providers
* @author ARCANEDEV <[email protected]>
*/
class CommandServiceProviderTest extends TestCase
{
/* ------------------------------------------------------------------------------------------------
| Properties
| ------------------------------------------------------------------------------------------------
*/
/** @var CommandServiceProvider */
private $provider;

/* ------------------------------------------------------------------------------------------------
| Main Functions
| ------------------------------------------------------------------------------------------------
*/
public function setUp()
{
parent::setUp();

$this->provider = $this->app->getProvider(CommandServiceProvider::class);
}

public function tearDown()
{
unset($this->provider);

parent::tearDown();
}

/* ------------------------------------------------------------------------------------------------
| Test Functions
| ------------------------------------------------------------------------------------------------
*/
/** @test */
public function it_can_be_instantiated()
{
$expectations = [
\Illuminate\Support\ServiceProvider::class,
\Arcanedev\Support\ServiceProvider::class,
\Arcanedev\Support\Providers\CommandServiceProvider::class,
\Arcanesoft\Settings\Providers\CommandServiceProvider::class,
];

foreach ($expectations as $expected) {
$this->assertInstanceOf($expected, $this->provider);
}
}

/** @test */
public function it_can_provides()
{
$expected = [
'arcanesoft.settings.commands.publish',
];

$this->assertEquals($expected, $this->provider->provides());
}
}

0 comments on commit ca625a6

Please sign in to comment.