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

JobTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 10
dl 0
loc 18
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A testResult() 0 2 1
A getJobs() 0 9 1
A assertSame() 0 2 1
1
<?php
2
declare(strict_types=1);
3
4
namespace MyTester;
5
6
use MyTester\Annotations\Attributes\TestSuite;
7
8
/**
9
 * Test suite for class Job
10
 *
11
 * @author Jakub Konečný
12
 * @testSuit JobTest
13
 */
14
#[TestSuite("JobTest")]
0 ignored issues
show
introduced by
This comment is 84% valid code; is this commented out code?
Loading history...
15
final class JobTest extends TestCase {
16
  public function assertSame($expected, $actual): void {
0 ignored issues
show
introduced by
Possible useless method overriding detected
Loading history...
17
    parent::assertSame($expected, $actual);
18
  }
19
20
  public function testResult(string $text, bool $success = true): void {
0 ignored issues
show
introduced by
Possible useless method overriding detected
Loading history...
21
    parent::testResult($text, $success);
22
  }
23
24
  protected function getJobs(): array {
25
    $test = new TestJobs($this);
26
    $job = new Job("Test Job", [$test, "test"]);
27
    $params = [
28
      ["abc"], "def"
29
    ];
30
    $job2 = new Job("Test Job with Params", [$test, "testParams"], $params);
31
    $job3 = new Job("Test Skipped Job", [$test, "test"], [], true);
32
    return [$job, $job2, $job3];
33
  }
34
}
35
?>