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

JobTest::getJobs()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 9
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\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
?>