Skip to content

Commit f79df12

Browse files
committed
Rename fixtures file name for consistency
1 parent cc50367 commit f79df12

File tree

7 files changed

+50
-4
lines changed

7 files changed

+50
-4
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
HTTP/1.1 200 OK
2+
Content-Type: application/json
3+
4+
{
5+
"port":{
6+
"status":"DOWN",
7+
"binding:host_id":"",
8+
"description":"",
9+
"allowed_address_pairs":[
10+
11+
],
12+
"extra_dhcp_opts":[
13+
14+
],
15+
"updated_at":"2017-02-24T07:31:56Z",
16+
"device_owner":"",
17+
"revision_number":5,
18+
"binding:profile":{
19+
20+
},
21+
"fixed_ips":[
22+
{
23+
"subnet_id":"d8e52c33-b301-4feb-9856-a71b71f06c1d",
24+
"ip_address":"192.168.254.20"
25+
}
26+
],
27+
"id":"a87cc70a-3e15-4acf-8205-9b711a3531b8",
28+
"security_groups":[
29+
"38172d7a-233f-49ba-b47c-91a66b92c7b4"
30+
],
31+
"device_id":"",
32+
"name":"",
33+
"admin_state_up":true,
34+
"network_id":"a87cc70a-3e15-4acf-8205-9b711a3531b7",
35+
"tenant_id":"500e0da6e1b54d65a81ba6fe922c65d1",
36+
"binding:vif_details":{
37+
38+
},
39+
"binding:vnic_type":"normal",
40+
"binding:vif_type":"unbound",
41+
"mac_address":"fa:16:3e:34:87:49",
42+
"project_id":"500e0da6e1b54d65a81ba6fe922c65d1",
43+
"created_at":"2017-02-24T07:31:55Z"
44+
}
45+
}

tests/unit/Networking/v2/Models/PortTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public function test_it_updates()
4040
'admin_state_up' => $opts['adminStateUp'],
4141
]];
4242

43-
$this->setupMock('PUT', 'v2.0/ports/' . self::PORT_ID, $expectedJson, [], 'GET_port');
43+
$this->setupMock('PUT', 'v2.0/ports/' . self::PORT_ID, $expectedJson, [], 'port_get');
4444

4545
$this->port->adminStateUp = false;
4646
$this->port->name = 'newName';
@@ -86,4 +86,5 @@ public function test_it_creates()
8686
$this->setupMock('POST', 'v2.0/ports', $expectedJson, [], 'port_post');
8787

8888
$this->port->create($opts);
89+
}
8990
}

tests/unit/Networking/v2/ServiceTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ public function test_it_creates_a_port()
203203
'admin_state_up' => $opts['adminStateUp'],
204204
]];
205205

206-
$this->setupMock('POST', 'v2.0/ports', $expectedJson, [], 'POST_ports');
206+
$this->setupMock('POST', 'v2.0/ports', $expectedJson, [], 'ports_post');
207207

208208
$this->assertInstanceOf(Port::class, $this->service->createPort($opts));
209209
}
@@ -238,7 +238,7 @@ public function test_it_bulk_creates_ports()
238238
],
239239
];
240240

241-
$this->setupMock('POST', 'v2.0/ports', $expectedJson, [], 'POST_multiple_ports');
241+
$this->setupMock('POST', 'v2.0/ports', $expectedJson, [], 'ports_multiple_post');
242242

243243
$ports = $this->service->createPorts($opts);
244244

@@ -259,7 +259,7 @@ public function test_it_lists_ports()
259259
$this->client
260260
->request('GET', 'v2.0/ports', ['headers' => []])
261261
->shouldBeCalled()
262-
->willReturn($this->getFixture('GET_ports'));
262+
->willReturn($this->getFixture('ports_get'));
263263

264264
foreach ($this->service->listPorts() as $port) {
265265
$this->assertInstanceOf(Port::class, $port);

0 commit comments

Comments
 (0)