-
Notifications
You must be signed in to change notification settings - Fork 157
Expand file tree
/
Copy pathHypervisorTest.php
More file actions
40 lines (33 loc) · 1.24 KB
/
HypervisorTest.php
File metadata and controls
40 lines (33 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php
namespace OpenStack\Sample\Compute\v2;
use OpenStack\Compute\v2\Models\Hypervisor;
use OpenStack\Compute\v2\Models\HypervisorStatistic;
class HypervisorTest extends TestCase
{
public function testList()
{
require_once $this->sampleFile(
'hypervisors/list_hypervisors.php',
[
'/** @var \OpenStack\Compute\v2\Models\Hypervisor $hypervisor */' => <<<'PHP'
/** @var \OpenStack\Compute\v2\Models\Hypervisor $hypervisor */
$this->assertInstanceOf(\OpenStack\Compute\v2\Models\Hypervisor::class, $hypervisor);
PHP
,
]
);
}
public function testGet()
{
/** @var \OpenStack\Compute\v2\Models\Hypervisor $hypervisor */
require_once $this->sampleFile('hypervisors/get_hypervisor.php', ['{hypervisorId}' => '1']);
$this->assertInstanceOf(Hypervisor::class, $hypervisor);
$this->assertEquals(1, $hypervisor->id);
}
public function testGetStatistics()
{
/** @var \OpenStack\Compute\v2\Models\HypervisorStatistic $hypervisorStatistics */
require_once $this->sampleFile('hypervisors/get_hypervisors_statistics.php', []);
$this->assertInstanceOf(HypervisorStatistic::class, $hypervisorStatistics);
}
}