@@ -36,20 +36,21 @@ function it_adds_domain_and_path(
36
36
UriInterface $ host ,
37
37
UriInterface $ uri
38
38
) {
39
- $ host ->getScheme ()->shouldBeCalled ()->willReturn ('http :// ' );
39
+ $ host ->getScheme ()->shouldBeCalled ()->willReturn ('https :// ' );
40
40
$ host ->getHost ()->shouldBeCalled ()->willReturn ('example.com ' );
41
41
$ host ->getPort ()->shouldBeCalled ()->willReturn (8000 );
42
42
$ host ->getPath ()->shouldBeCalled ()->willReturn ('/api ' );
43
43
44
44
$ request ->getUri ()->shouldBeCalled ()->willReturn ($ uri );
45
45
$ request ->withUri ($ uri )->shouldBeCalled ()->willReturn ($ request );
46
46
47
- $ uri ->withScheme ('http :// ' )->shouldBeCalled ()->willReturn ($ uri );
47
+ $ uri ->withScheme ('https :// ' )->shouldBeCalled ()->willReturn ($ uri );
48
48
$ uri ->withHost ('example.com ' )->shouldBeCalled ()->willReturn ($ uri );
49
49
$ uri ->withPort (8000 )->shouldBeCalled ()->willReturn ($ uri );
50
50
$ uri ->withPath ('/api/users ' )->shouldBeCalled ()->willReturn ($ uri );
51
51
$ uri ->getHost ()->shouldBeCalled ()->willReturn ('' );
52
52
$ uri ->getPath ()->shouldBeCalled ()->willReturn ('/users ' );
53
+ $ uri ->__toString ()->shouldBeCalled ()->willReturn ('https://example.com/api/users ' );
53
54
54
55
$ this ->beConstructedWith ($ host );
55
56
$ this ->handleRequest ($ request , function () {}, function () {});
@@ -60,15 +61,15 @@ function it_adds_domain(
60
61
UriInterface $ host ,
61
62
UriInterface $ uri
62
63
) {
63
- $ host ->getScheme ()->shouldBeCalled ()->willReturn ('http :// ' );
64
+ $ host ->getScheme ()->shouldBeCalled ()->willReturn ('https :// ' );
64
65
$ host ->getHost ()->shouldBeCalled ()->willReturn ('example.com ' );
65
66
$ host ->getPort ()->shouldBeCalled ()->willReturn (8000 );
66
67
$ host ->getPath ()->shouldBeCalled ()->willReturn ('/ ' );
67
68
68
69
$ request ->getUri ()->shouldBeCalled ()->willReturn ($ uri );
69
70
$ request ->withUri ($ uri )->shouldBeCalled ()->willReturn ($ request );
70
71
71
- $ uri ->withScheme ('http :// ' )->shouldBeCalled ()->willReturn ($ uri );
72
+ $ uri ->withScheme ('https :// ' )->shouldBeCalled ()->willReturn ($ uri );
72
73
$ uri ->withHost ('example.com ' )->shouldBeCalled ()->willReturn ($ uri );
73
74
$ uri ->withPort (8000 )->shouldBeCalled ()->willReturn ($ uri );
74
75
$ uri ->getHost ()->shouldBeCalled ()->willReturn ('' );
@@ -82,19 +83,20 @@ function it_replaces_domain_and_adds_path(
82
83
UriInterface $ host ,
83
84
UriInterface $ uri
84
85
) {
85
- $ host ->getScheme ()->shouldBeCalled ()->willReturn ('http :// ' );
86
+ $ host ->getScheme ()->shouldBeCalled ()->willReturn ('https :// ' );
86
87
$ host ->getHost ()->shouldBeCalled ()->willReturn ('example.com ' );
87
88
$ host ->getPort ()->shouldBeCalled ()->willReturn (8000 );
88
89
$ host ->getPath ()->shouldBeCalled ()->willReturn ('/api ' );
89
90
90
91
$ request ->getUri ()->shouldBeCalled ()->willReturn ($ uri );
91
92
$ request ->withUri ($ uri )->shouldBeCalled ()->willReturn ($ request );
92
93
93
- $ uri ->withScheme ('http :// ' )->shouldBeCalled ()->willReturn ($ uri );
94
+ $ uri ->withScheme ('https :// ' )->shouldBeCalled ()->willReturn ($ uri );
94
95
$ uri ->withHost ('example.com ' )->shouldBeCalled ()->willReturn ($ uri );
95
96
$ uri ->withPort (8000 )->shouldBeCalled ()->willReturn ($ uri );
96
97
$ uri ->withPath ('/api/users ' )->shouldBeCalled ()->willReturn ($ uri );
97
98
$ uri ->getPath ()->shouldBeCalled ()->willReturn ('/users ' );
99
+ $ uri ->__toString ()->shouldBeCalled ()->willReturn ('https://example.com/api/users ' );
98
100
99
101
$ this ->beConstructedWith ($ host , ['replace ' => true ]);
100
102
$ this ->handleRequest ($ request , function () {}, function () {});
0 commit comments