-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use the newest rollbar.js version, but allow user to select custom one
- Loading branch information
1 parent
b8d6f4d
commit 764ff89
Showing
6 changed files
with
81 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,11 @@ | ||
<?php | ||
|
||
namespace Ftrrtf\RollbarBundle\Faker; | ||
|
||
class Application | ||
{ | ||
public function getUser() | ||
{ | ||
|
||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?php | ||
|
||
namespace spec\Ftrrtf\RollbarBundle\Twig; | ||
|
||
use Ftrrtf\RollbarBundle\Faker\Application; | ||
use Ftrrtf\RollbarBundle\Helper\UserHelper; | ||
use Ftrrtf\RollbarBundle\Twig\RollbarExtension; | ||
use PhpSpec\ObjectBehavior; | ||
use Prophecy\Argument; | ||
|
||
/** | ||
* @mixin RollbarExtension | ||
*/ | ||
class RollbarExtensionSpec extends ObjectBehavior | ||
{ | ||
function let(UserHelper $helper) | ||
{ | ||
$this->beConstructedWith([], [], $helper); | ||
} | ||
|
||
function it_is_initializable() | ||
{ | ||
$this->shouldHaveType('Ftrrtf\RollbarBundle\Twig\RollbarExtension'); | ||
} | ||
|
||
function it_uses_the_newest_version_of_rollbarjs(UserHelper $helper, Application $app) | ||
{ | ||
$this->beConstructedWith( | ||
[ | ||
'access_token' => 'access_token', | ||
'source_map_enabled' => false, | ||
'allowed_js_hosts' => [], | ||
'rollbarjs_version' => 'v1', | ||
], | ||
[ | ||
'environment' => 'test', | ||
], | ||
$helper | ||
); | ||
|
||
$this->getInitRollbarCode(['app' => $app])->shouldMatch('/v1/'); | ||
} | ||
|
||
function it_allows_to_select_rollbarjs_version(UserHelper $helper, Application $app) | ||
{ | ||
$this->beConstructedWith( | ||
[ | ||
'access_token' => 'access_token', | ||
'source_map_enabled' => false, | ||
'allowed_js_hosts' => [], | ||
'rollbarjs_version' => 'v1.7' | ||
], | ||
[ | ||
'environment' => 'test', | ||
], | ||
$helper | ||
); | ||
|
||
$this->getInitRollbarCode(['app' => $app])->shouldMatch('/v1.7/'); | ||
} | ||
} |