|
1 | 1 | <?php |
2 | 2 |
|
3 | | -namespace Tests\Webrtc\ICE; |
4 | 3 |
|
5 | 4 | use PHPUnit\Framework\Attributes\CoversClass; |
6 | 5 | use PHPUnit\Framework\Attributes\UsesClass; |
|
20 | 19 | use Webrtc\ICE\RTCIceGatherer; |
21 | 20 | use Webrtc\ICE\RTCIceParameters; |
22 | 21 | use Webrtc\ICE\RTCIceProtocolConfiguration; |
| 22 | +use Webrtc\ICE\RTCICESetting; |
23 | 23 | use Webrtc\ICE\RTCIceTransport; |
24 | 24 | use Webrtc\ICE\Trait\Mdns; |
25 | 25 | use Webrtc\ICE\Trait\NetworkAdapter; |
@@ -107,10 +107,14 @@ public function testConstruct() |
107 | 107 |
|
108 | 108 | public function testConnect() |
109 | 109 | { |
110 | | - $gatherer1 = new RTCIceGatherer([], role: IceRole::Controlling); |
| 110 | + $iceSetting1 = new RTCICESetting; |
| 111 | + $iceSetting1->setIceRole(IceRole::Controlling); |
| 112 | + $gatherer1 = new RTCIceGatherer([], $iceSetting1); |
111 | 113 | $transport1 = new RTCIceTransport($gatherer1); |
112 | 114 |
|
113 | | - $gatherer2 = new RTCIceGatherer([], role: IceRole::Controlled); |
| 115 | + $iceSetting2 = new RTCICESetting; |
| 116 | + $iceSetting2->setIceRole(IceRole::Controlled); |
| 117 | + $gatherer2 = new RTCIceGatherer([], $iceSetting2); |
114 | 118 | $transport2 = new RTCIceTransport($gatherer2); |
115 | 119 |
|
116 | 120 | $gatherer1->gather(); |
@@ -140,10 +144,14 @@ public function testConnect() |
140 | 144 |
|
141 | 145 | public function testConnectFail() |
142 | 146 | { |
143 | | - $gatherer1 = new RTCIceGatherer([], role: IceRole::Controlling); |
| 147 | + $iceSetting1 = new RTCICESetting; |
| 148 | + $iceSetting1->setIceRole(IceRole::Controlling); |
| 149 | + $gatherer1 = new RTCIceGatherer([], $iceSetting1); |
144 | 150 | $transport1 = new RTCIceTransport($gatherer1); |
145 | 151 |
|
146 | | - $gatherer2 = new RTCIceGatherer([], role: IceRole::Controlled); |
| 152 | + $iceSetting2 = new RTCICESetting; |
| 153 | + $iceSetting2->setIceRole(IceRole::Controlled); |
| 154 | + $gatherer2 = new RTCIceGatherer([], $iceSetting2); |
147 | 155 | $transport2 = new RTCIceTransport($gatherer2); |
148 | 156 |
|
149 | 157 | $gatherer1->gather(); |
@@ -173,10 +181,14 @@ public function testConnectFail() |
173 | 181 |
|
174 | 182 | public function testConnectThenConsentExpires() |
175 | 183 | { |
176 | | - $gatherer1 = new RTCIceGatherer([], role: IceRole::Controlling); |
| 184 | + $iceSetting1 = new RTCICESetting; |
| 185 | + $iceSetting1->setIceRole(IceRole::Controlling); |
| 186 | + $gatherer1 = new RTCIceGatherer([], $iceSetting1); |
177 | 187 | $transport1 = new RTCIceTransport($gatherer1); |
178 | 188 |
|
179 | | - $gatherer2 = new RTCIceGatherer([], role: IceRole::Controlled); |
| 189 | + $iceSetting2 = new RTCICESetting; |
| 190 | + $iceSetting2->setIceRole(IceRole::Controlled); |
| 191 | + $gatherer2 = new RTCIceGatherer([], $iceSetting2); |
180 | 192 | $transport2 = new RTCIceTransport($gatherer2); |
181 | 193 |
|
182 | 194 | $gatherer1->gather(); |
|
0 commit comments