Skip to content

Commit

Permalink
fix attribute usage 🤷
Browse files Browse the repository at this point in the history
  • Loading branch information
maschmann committed Sep 13, 2024
1 parent 5d6df1e commit d6a9114
Showing 1 changed file with 32 additions and 25 deletions.
57 changes: 32 additions & 25 deletions Tests/Asm/Ansible/AnsibleTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@
class AnsibleTest extends AnsibleTestCase
{

#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testInstance()
{
$ansible = new Ansible(
Expand All @@ -25,9 +26,10 @@ public function testInstance()
$this->assertInstanceOf('\Asm\Ansible\Ansible', $ansible, 'Instantiation with given paths');
}

#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testAnsibleProjectPathNotFoundException()
{
$this->expectException(CommandException::class);
Expand All @@ -38,9 +40,10 @@ public function testAnsibleProjectPathNotFoundException()
);
}

#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testAnsibleCommandNotFoundException()
{
$this->expectException(CommandException::class);
Expand All @@ -51,9 +54,10 @@ public function testAnsibleCommandNotFoundException()
);
}

#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testAnsibleNoCommandGivenException()
{
// TODO: Not sure why the following command should give an error.
Expand All @@ -63,9 +67,10 @@ public function testAnsibleNoCommandGivenException()
// );
}

#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testAnsibleCommandNotExecutableException()
{
$this->expectException(CommandException::class);
Expand All @@ -80,11 +85,12 @@ public function testAnsibleCommandNotExecutableException()
);
}

#[CoversFunction('\Asm\Ansible\Ansible::playbook')]
#[CoversFunction('\Asm\Ansible\Ansible::createProcess')]
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('playbook')]
#[CoversFunction('createProcess')]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testPlaybookCommandInstance()
{
$ansible = new Ansible(
Expand All @@ -98,11 +104,12 @@ public function testPlaybookCommandInstance()
$this->assertInstanceOf('\Asm\Ansible\Command\AnsiblePlaybook', $playbook);
}

#[CoversFunction('\Asm\Ansible\Ansible::playbook')]
#[CoversFunction('\Asm\Ansible\Ansible::createProcess')]
#[CoversFunction('\Asm\Ansible\Ansible::checkCommand')]
#[CoversFunction('\Asm\Ansible\Ansible::checkDir')]
#[CoversFunction('\Asm\Ansible\Ansible::__construct')]
#[CoversClass(\Asm\Ansible\Ansible::class)]
#[CoversFunction('playbook')]
#[CoversFunction('createProcess')]
#[CoversFunction('checkCommand')]
#[CoversFunction('checkDir')]
#[CoversFunction('__construct')]
public function testGalaxyCommandInstance()
{
$ansible = new Ansible(
Expand Down

0 comments on commit d6a9114

Please sign in to comment.