Skip to content

Commit

Permalink
Test that interface is registered in container not the implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
stayallive committed Sep 30, 2019
1 parent a587b4f commit df435a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/Sentry/ServiceProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Sentry\Laravel\Tests;

use Sentry\State\Hub;
use Sentry\Laravel\Facade;
use Sentry\Laravel\ServiceProvider;
use Sentry\State\HubInterface;

class ServiceProviderTest extends \Orchestra\Testbench\TestCase
{
Expand All @@ -31,7 +31,7 @@ protected function getPackageAliases($app)
public function testIsBound()
{
$this->assertTrue(app()->bound('sentry'));
$this->assertInstanceOf(Hub::class, app('sentry'));
$this->assertInstanceOf(HubInterface::class, app('sentry'));
$this->assertSame(app('sentry'), Facade::getFacadeRoot());
}

Expand Down
4 changes: 2 additions & 2 deletions test/Sentry/ServiceProviderWithCustomAliasTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

namespace Sentry\Laravel\Tests;

use Sentry\State\Hub;
use Sentry\Laravel\Facade;
use Sentry\Laravel\ServiceProvider;
use Sentry\State\HubInterface;

class ServiceProviderWithCustomAliasTest extends \Orchestra\Testbench\TestCase
{
Expand All @@ -31,7 +31,7 @@ protected function getPackageAliases($app)
public function testIsBound()
{
$this->assertTrue(app()->bound('custom-sentry'));
$this->assertInstanceOf(Hub::class, app('custom-sentry'));
$this->assertInstanceOf(HubInterface::class, app('custom-sentry'));
$this->assertSame(app('custom-sentry'), CustomSentryFacade::getFacadeRoot());
}

Expand Down

0 comments on commit df435a4

Please sign in to comment.