Skip to content

Instantly share code, notes, and snippets.

@alariva
Created December 14, 2018 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alariva/a170738ae4d7841ca2cd6f97708e629e to your computer and use it in GitHub Desktop.
Save alariva/a170738ae4d7841ca2cd6f97708e629e to your computer and use it in GitHub Desktop.
Laravel test to make sure RollbarLogger can be instantiated
<?php
namespace Tests\Unit;
use Tests\TestCase;
/**
* @author Ariel Vallese <alariva@gmail.com>
*
* @version 1.0-2018-12-14
*
* Test to make sure that RollbarLogger can be instantiated.
* Many configuration errors can be caught on early stage by making sure that
* the RollbarLogger can be instantiated.
*
* See:
*
* @link https://medium.com/@alariva/checking-rollbar-service-with-beyondcode-laravel-self-diagnosis-cb091d741dc1
* @link https://github.com/rollbar/rollbar-php-laravel/issues/64
*/
class RollbarConfigurationTest extends TestCase
{
public function test_rollbar_has_correct_configuration_to_be_instantiated()
{
$rollbar = app()->make(\Rollbar\RollbarLogger::class);
$this->assertInstanceOf(\Rollbar\RollbarLogger::class, $rollbar);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment