File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change 13
13
],
14
14
"require" : {
15
15
"php" : " >=5.5.9" ,
16
- "twilio/sdk" : " ^4.11 " ,
16
+ "twilio/sdk" : " ^5.4.1 " ,
17
17
"illuminate/notifications" : " 5.1.*|5.2.*|5.3.*" ,
18
18
"illuminate/support" : " 5.1.*|5.2.*|5.3.*" ,
19
19
"illuminate/events" : " 5.1.*|5.2.*|5.3.*" ,
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ public function boot()
15
15
$ this ->app ->when (TwilioChannel::class)
16
16
->needs (Twilio::class)
17
17
->give (function () {
18
- $ config = $ this ->app ->make (TwilioConfig::class, $ this -> app [ ' config ' ][ ' services.twilio ' ] );
18
+ $ config = $ this ->app ->make (TwilioConfig::class);
19
19
$ twilio = $ this ->app ->make (TwilioService::class, [
20
20
$ config ->getAccountSid (),
21
21
$ config ->getAuthToken (),
@@ -30,5 +30,8 @@ public function boot()
30
30
*/
31
31
public function register ()
32
32
{
33
+ $ this ->app ->bind (TwilioConfig::class, function () {
34
+ return new TwilioConfig ($ this ->app ['config ' ]['services.twilio ' ]);
35
+ });
33
36
}
34
37
}
Original file line number Diff line number Diff line change @@ -42,14 +42,7 @@ public function it_gives_an_instantiated_twilio_object_when_the_channel_asks_for
42
42
$ twilio = Mockery::mock (TwilioService::class);
43
43
$ config = Mockery::mock (TwilioConfig::class, $ configArray );
44
44
45
- $ this ->app ->shouldReceive ('offsetGet ' )
46
- ->once ()
47
- ->with ('config ' )
48
- ->andReturn ([
49
- 'services.twilio ' => $ configArray
50
- ]);
51
-
52
- $ this ->app ->shouldReceive ('make ' )->with (TwilioConfig::class, $ configArray )->andReturn ($ config );
45
+ $ this ->app ->shouldReceive ('make ' )->with (TwilioConfig::class)->andReturn ($ config );
53
46
54
47
$ config ->shouldReceive ('getAccountSid ' )->once ()->andReturn ($ configArray ['account_sid ' ]);
55
48
$ config ->shouldReceive ('getAuthToken ' )->once ()->andReturn ($ configArray ['auth_token ' ]);
You can’t perform that action at this time.
0 commit comments