Skip to content

Commit d6a9114

Browse files
committed
fix attribute usage 🤷
1 parent 5d6df1e commit d6a9114

File tree

1 file changed

+32
-25
lines changed

1 file changed

+32
-25
lines changed

Tests/Asm/Ansible/AnsibleTest.php

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
class AnsibleTest extends AnsibleTestCase
1313
{
1414

15-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
16-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
17-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
15+
#[CoversClass(\Asm\Ansible\Ansible::class)]
16+
#[CoversFunction('checkCommand')]
17+
#[CoversFunction('checkDir')]
18+
#[CoversFunction('__construct')]
1819
public function testInstance()
1920
{
2021
$ansible = new Ansible(
@@ -25,9 +26,10 @@ public function testInstance()
2526
$this->assertInstanceOf('\Asm\Ansible\Ansible', $ansible, 'Instantiation with given paths');
2627
}
2728

28-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
29-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
30-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
29+
#[CoversClass(\Asm\Ansible\Ansible::class)]
30+
#[CoversFunction('checkCommand')]
31+
#[CoversFunction('checkDir')]
32+
#[CoversFunction('__construct')]
3133
public function testAnsibleProjectPathNotFoundException()
3234
{
3335
$this->expectException(CommandException::class);
@@ -38,9 +40,10 @@ public function testAnsibleProjectPathNotFoundException()
3840
);
3941
}
4042

41-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
42-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
43-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
43+
#[CoversClass(\Asm\Ansible\Ansible::class)]
44+
#[CoversFunction('checkCommand')]
45+
#[CoversFunction('checkDir')]
46+
#[CoversFunction('__construct')]
4447
public function testAnsibleCommandNotFoundException()
4548
{
4649
$this->expectException(CommandException::class);
@@ -51,9 +54,10 @@ public function testAnsibleCommandNotFoundException()
5154
);
5255
}
5356

54-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
55-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
56-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
57+
#[CoversClass(\Asm\Ansible\Ansible::class)]
58+
#[CoversFunction('checkCommand')]
59+
#[CoversFunction('checkDir')]
60+
#[CoversFunction('__construct')]
5761
public function testAnsibleNoCommandGivenException()
5862
{
5963
// TODO: Not sure why the following command should give an error.
@@ -63,9 +67,10 @@ public function testAnsibleNoCommandGivenException()
6367
// );
6468
}
6569

66-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
67-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
68-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
70+
#[CoversClass(\Asm\Ansible\Ansible::class)]
71+
#[CoversFunction('checkCommand')]
72+
#[CoversFunction('checkDir')]
73+
#[CoversFunction('__construct')]
6974
public function testAnsibleCommandNotExecutableException()
7075
{
7176
$this->expectException(CommandException::class);
@@ -80,11 +85,12 @@ public function testAnsibleCommandNotExecutableException()
8085
);
8186
}
8287

83-
#[CoversFunction('\Asm\Ansible\Ansible::playbook')]
84-
#[CoversFunction('\Asm\Ansible\Ansible::createProcess')]
85-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
86-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
87-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
88+
#[CoversClass(\Asm\Ansible\Ansible::class)]
89+
#[CoversFunction('playbook')]
90+
#[CoversFunction('createProcess')]
91+
#[CoversFunction('checkCommand')]
92+
#[CoversFunction('checkDir')]
93+
#[CoversFunction('__construct')]
8894
public function testPlaybookCommandInstance()
8995
{
9096
$ansible = new Ansible(
@@ -98,11 +104,12 @@ public function testPlaybookCommandInstance()
98104
$this->assertInstanceOf('\Asm\Ansible\Command\AnsiblePlaybook', $playbook);
99105
}
100106

101-
#[CoversFunction('\Asm\Ansible\Ansible::playbook')]
102-
#[CoversFunction('\Asm\Ansible\Ansible::createProcess')]
103-
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
104-
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
105-
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
107+
#[CoversClass(\Asm\Ansible\Ansible::class)]
108+
#[CoversFunction('playbook')]
109+
#[CoversFunction('createProcess')]
110+
#[CoversFunction('checkCommand')]
111+
#[CoversFunction('checkDir')]
112+
#[CoversFunction('__construct')]
106113
public function testGalaxyCommandInstance()
107114
{
108115
$ansible = new Ansible(

0 commit comments

Comments
 (0)