Completed
Push — master ( dbb439...8abb49 )
by Jakub
01:34
created

ShouldFailTest::shouldFail()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 0
dl 0
loc 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
declare(strict_types=1);
3
4
namespace MyTester;
5
6
use MyTester\Annotations\Attributes\Fail;
7
use MyTester\Annotations\Attributes\TestSuite;
8
9
/**
10
 * Test suite for class ShouldFail
11
 *
12
 * @testSuite ShouldFail
13
 * @author Jakub Konečný
14
 */
15
#[TestSuite("ShouldFail")]
0 ignored issues
show
introduced by
This comment is 84% valid code; is this commented out code?
Loading history...
16
final class ShouldFailTest extends TestCase {
17
  private function getShouldFailChecker(): ShouldFailChecker {
18
    return $this->shouldFailChecker;
19
  }
20
21
  public function testShouldFail(): void {
22
    $this->assertFalse($this->getShouldFailChecker()->shouldFail(static::class, "shouldFailFalse"));
23
    $this->assertTrue($this->getShouldFailChecker()->shouldFail(static::class, "shouldFail"));
24
  }
25
26
  private function shouldFailFalse(): void {
1 ignored issue
show
Unused Code introduced by
The method shouldFailFalse() is not used, and could be removed.

This check looks for private methods that have been defined, but are not used inside the class.

Loading history...
27
  }
28
29
  /**
30
   * @fail
31
   */
32
  #[Fail()]
0 ignored issues
show
introduced by
This comment is 80% valid code; is this commented out code?
Loading history...
33
  private function shouldFail(): void {
34
  }
35
}
36
?>