-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for deprecated getMonolog method (#3)
* Fix for deprecated getMonolog method * Update README.md
- Loading branch information
1 parent
40835bd
commit ab9ce5b
Showing
5 changed files
with
42 additions
and
5 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
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
class TestCase extends \PHPUnit_Framework_TestCase | ||
class TestCase extends \PHPUnit\Framework\TestCase | ||
{ | ||
// | ||
} |
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,36 @@ | ||
<?php | ||
|
||
use PodPoint\KinesisLogger\Providers\ServiceProvider; | ||
use Orchestra\Testbench\TestCase; | ||
use PodPoint\KinesisLogger\Monolog\KinesisHandler; | ||
|
||
class ServiceProviderTest extends TestCase | ||
{ | ||
/** | ||
* Define environment setup. | ||
* | ||
* @param \Illuminate\Foundation\Application $app | ||
* @return void | ||
*/ | ||
protected function getEnvironmentSetUp($app) | ||
{ | ||
$app['config']->set('kinesis.stream', 'stream'); | ||
$app['config']->set('kinesis.aws.region', 'region'); | ||
$app['config']->set('kinesis.aws.key', 'key'); | ||
$app['config']->set('kinesis.aws.secret', 'secret'); | ||
$app['config']->set('kinesis.level', 1); | ||
} | ||
|
||
/** | ||
* Test the service provider registers the handler. | ||
*/ | ||
public function testServiceProvider() | ||
{ | ||
$provider = new ServiceProvider($this->app); | ||
$provider->boot(); | ||
|
||
$monolog = Log::getLogger(); | ||
|
||
$this->assertEquals(KinesisHandler::class, get_class($monolog->popHandler())); | ||
} | ||
} |