Completed
Pull Request — master (#30)
by Matthew
24:15
created

JobTimingManagerTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 15
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testPruneJobTimings() 0 12 2
1
<?php
2
3
namespace Dtc\QueueBundle\Tests\Manager;
4
5
use Dtc\QueueBundle\Exception\UnsupportedException;
6
use Dtc\QueueBundle\Manager\JobTimingManager;
7
use PHPUnit\Framework\TestCase;
8
9
class JobTimingManagerTest extends TestCase
10
{
11
    public function testPruneJobTimings()
12
    {
13
        $jobTimingManager = new JobTimingManager('a', false);
14
        $failure = false;
15
        try {
16
            $jobTimingManager->pruneJobTimings(new \DateTime());
17
            $failure = true;
18
        } catch (UnsupportedException $exception) {
19
            self::assertNotNull($exception);
20
        }
21
        self::assertFalse($failure);
22
    }
23
}
24