File tree Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Expand file tree Collapse file tree 1 file changed +8
-13
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Brick \Tests \Provider ;
4
4
5
+ use Silex \Application ;
5
6
use Silex \Provider \TwigServiceProvider ;
6
7
use Brick \Provider \ExceptionServiceProvider ;
7
- use Pimple \Container ;
8
8
9
9
class ExceptionServiceProviderTest extends \PHPUnit_Framework_TestCase
10
10
{
11
11
public function setUp ()
12
12
{
13
- $ this ->pimple = new Container ([
14
- 'exception_handler ' => function () {
15
- return 'exception_handler ' ;
16
- },
17
- 'logger ' => function () {},
18
- ]);
19
-
20
- $ this ->pimple ->register (new TwigServiceProvider );
21
- $ this ->pimple ->register (new ExceptionServiceProvider );
13
+ $ this ->app = new Application ();
14
+
15
+ $ this ->app ->register (new TwigServiceProvider );
16
+ $ this ->app ->register (new ExceptionServiceProvider );
22
17
}
23
18
24
19
public function testOverrideExceptionHandler ()
25
20
{
26
- $ this ->assertInstanceOf ('Symfony\Component\HttpKernel\EventListener\ExceptionListener ' , $ this ->pimple ['exception_handler ' ]);
21
+ $ this ->assertInstanceOf ('Symfony\Component\HttpKernel\EventListener\ExceptionListener ' , $ this ->app ['exception_handler ' ]);
27
22
}
28
23
29
24
public function testExceptionController ()
30
25
{
31
26
$ provider = new TwigServiceProvider ;
32
- $ provider ->register ($ this ->pimple );
27
+ $ provider ->register ($ this ->app );
33
28
34
- $ this ->assertInstanceOf ('Brick\Controller\ExceptionController ' , $ this ->pimple ['exception_controller ' ]);
29
+ $ this ->assertInstanceOf ('Brick\Controller\ExceptionController ' , $ this ->app ['exception_controller ' ]);
35
30
}
36
31
37
32
}
You can’t perform that action at this time.
0 commit comments