-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from SocialiteProviders/feature/12-service-pro…
…vider-test Changed service provider to have SocialiteWasCalled Injected. Added test for ServiceProvider
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
namespace SocialiteProviders\Manager; | ||
|
||
use Mockery as m; | ||
|
||
class ServiceProviderTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
|
||
public function tearDown() | ||
{ | ||
\Mockery::close(); | ||
} | ||
|
||
/** | ||
* @test | ||
*/ | ||
public function it_fires_an_event() | ||
{ | ||
$app = m::mock('Illuminate\Contracts\Foundation\Application'); | ||
$socialiteWasCalled = m::mock('SocialiteProviders\Manager\SocialiteWasCalled'); | ||
|
||
$event = m::mock('Illuminate\Contracts\Events\Dispatcher'); | ||
$event->shouldReceive('fire')->with($socialiteWasCalled); | ||
|
||
$sp = new ServiceProvider($app); | ||
$sp->boot($event, $socialiteWasCalled); | ||
} | ||
} |