@@ -70,35 +70,6 @@ public function testConstructWithConnectorAssignsGivenConnector()
70
70
$ this ->assertSame ($ connector , $ ret );
71
71
}
72
72
73
- public function testConstructWithConnectorWithLegacySignatureAssignsGivenConnector ()
74
- {
75
- $ connector = $ this ->getMockBuilder ('React\Socket\ConnectorInterface ' )->getMock ();
76
-
77
- $ browser = new Browser (null , $ connector );
78
-
79
- $ ref = new \ReflectionProperty ($ browser , 'transaction ' );
80
- $ ref ->setAccessible (true );
81
- $ transaction = $ ref ->getValue ($ browser );
82
-
83
- $ ref = new \ReflectionProperty ($ transaction , 'sender ' );
84
- $ ref ->setAccessible (true );
85
- $ sender = $ ref ->getValue ($ transaction );
86
-
87
- $ ref = new \ReflectionProperty ($ sender , 'http ' );
88
- $ ref ->setAccessible (true );
89
- $ client = $ ref ->getValue ($ sender );
90
-
91
- $ ref = new \ReflectionProperty ($ client , 'connectionManager ' );
92
- $ ref ->setAccessible (true );
93
- $ connectionManager = $ ref ->getValue ($ client );
94
-
95
- $ ref = new \ReflectionProperty ($ connectionManager , 'connector ' );
96
- $ ref ->setAccessible (true );
97
- $ ret = $ ref ->getValue ($ connectionManager );
98
-
99
- $ this ->assertSame ($ connector , $ ret );
100
- }
101
-
102
73
public function testConstructWithLoopAssignsGivenLoop ()
103
74
{
104
75
$ browser = new Browser (null , $ this ->loop );
@@ -114,49 +85,6 @@ public function testConstructWithLoopAssignsGivenLoop()
114
85
$ this ->assertSame ($ this ->loop , $ loop );
115
86
}
116
87
117
- public function testConstructWithLoopWithLegacySignatureAssignsGivenLoop ()
118
- {
119
- $ browser = new Browser ($ this ->loop );
120
-
121
- $ ref = new \ReflectionProperty ($ browser , 'transaction ' );
122
- $ ref ->setAccessible (true );
123
- $ transaction = $ ref ->getValue ($ browser );
124
-
125
- $ ref = new \ReflectionProperty ($ transaction , 'loop ' );
126
- $ ref ->setAccessible (true );
127
- $ loop = $ ref ->getValue ($ transaction );
128
-
129
- $ this ->assertSame ($ this ->loop , $ loop );
130
- }
131
-
132
- public function testConstructWithInvalidConnectorThrows ()
133
- {
134
- $ this ->setExpectedException ('InvalidArgumentException ' );
135
- new Browser ('foo ' );
136
- }
137
-
138
- public function testConstructWithInvalidLoopThrows ()
139
- {
140
- $ connector = $ this ->getMockBuilder ('React\Socket\ConnectorInterface ' )->getMock ();
141
-
142
- $ this ->setExpectedException ('InvalidArgumentException ' );
143
- new Browser ($ connector , 'foo ' );
144
- }
145
-
146
- public function testConstructWithConnectorTwiceThrows ()
147
- {
148
- $ connector = $ this ->getMockBuilder ('React\Socket\ConnectorInterface ' )->getMock ();
149
-
150
- $ this ->setExpectedException ('InvalidArgumentException ' );
151
- new Browser ($ connector , $ connector );
152
- }
153
-
154
- public function testConstructWithLoopTwiceThrows ()
155
- {
156
- $ this ->setExpectedException ('InvalidArgumentException ' );
157
- new Browser ($ this ->loop , $ this ->loop );
158
- }
159
-
160
88
public function testGetSendsGetRequest ()
161
89
{
162
90
$ that = $ this ;
0 commit comments