From 9440f38d490c75419fddf5b8dec89a41805dcb4a Mon Sep 17 00:00:00 2001 From: Marc Aschmann Date: Fri, 13 Sep 2024 22:40:41 +0200 Subject: [PATCH] last try with attribute-foo :eyes_rolling: --- Tests/Asm/Ansible/AnsibleTest.php | 38 +++++-------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/Tests/Asm/Ansible/AnsibleTest.php b/Tests/Asm/Ansible/AnsibleTest.php index 72d5465..9d29772 100644 --- a/Tests/Asm/Ansible/AnsibleTest.php +++ b/Tests/Asm/Ansible/AnsibleTest.php @@ -10,13 +10,15 @@ use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\CoversFunction; +#[CoversClass(\Asm\Ansible\Ansible::class)] +#[CoversFunction('playbook')] +#[CoversFunction('createProcess')] +#[CoversFunction('checkCommand')] +#[CoversFunction('checkDir')] +#[CoversFunction('__construct')] class AnsibleTest extends AnsibleTestCase { - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testInstance() { $ansible = new Ansible( @@ -27,10 +29,6 @@ public function testInstance() $this->assertInstanceOf('\Asm\Ansible\Ansible', $ansible, 'Instantiation with given paths'); } - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testAnsibleProjectPathNotFoundException() { $this->expectException(CommandException::class); @@ -41,10 +39,6 @@ public function testAnsibleProjectPathNotFoundException() ); } - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testAnsibleCommandNotFoundException() { $this->expectException(CommandException::class); @@ -55,10 +49,6 @@ public function testAnsibleCommandNotFoundException() ); } - #[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. @@ -68,10 +58,6 @@ public function testAnsibleNoCommandGivenException() // ); } - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testAnsibleCommandNotExecutableException() { $this->expectException(CommandException::class); @@ -86,12 +72,6 @@ public function testAnsibleCommandNotExecutableException() ); } - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('playbook')] - #[CoversFunction('createProcess')] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testPlaybookCommandInstance() { $ansible = new Ansible( @@ -105,12 +85,6 @@ public function testPlaybookCommandInstance() $this->assertInstanceOf('\Asm\Ansible\Command\AnsiblePlaybook', $playbook); } - #[CoversClass(\Asm\Ansible\Ansible::class)] - #[CoversFunction('playbook')] - #[CoversFunction('createProcess')] - #[CoversFunction('checkCommand')] - #[CoversFunction('checkDir')] - #[CoversFunction('__construct')] public function testGalaxyCommandInstance() { $ansible = new Ansible(