File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515
1616 describe ('->__invoke ' , function () {
1717
18+ given ('container ' , function () {
19+ return Double::instance (['implements ' => ContainerInterface::class]);
20+ });
21+
1822 it ('returns ' . ForceHttps::class . ' instance with default config ' , function () {
1923
2024 $ config = [];
21- $ container = Double::instance (['implements ' => ContainerInterface::class]);
22- allow ($ container )->toReceive ('get ' )->with ('config ' )->andReturn ($ config );
25+ allow ($ this ->container )->toReceive ('get ' )->with ('config ' )->andReturn ($ config );
26+
27+ $ actual = $ this ->factory ->__invoke ($ this ->container );
2328
24- $ actual = $ this ->factory ->__invoke ($ container );
2529 expect ($ actual )->toBeAnInstanceOf (ForceHttps::class);
2630
2731 });
3539 'force_specific_routes ' => [],
3640 ],
3741 ];
38- $ container = Double::instance (['implements ' => ContainerInterface::class]);
39- allow ($ container )->toReceive ('get ' )->with ('config ' )->andReturn ($ config );
42+ allow ($ this ->container )->toReceive ('get ' )->with ('config ' )->andReturn ($ config );
4043
41- $ actual = $ this ->factory ->__invoke ($ container );
44+ $ actual = $ this ->factory ->__invoke ($ this ->container );
45+
4246 expect ($ actual )->toBeAnInstanceOf (ForceHttps::class);
4347
4448 });
You can’t perform that action at this time.
0 commit comments