Code Duplication    Length = 11-11 lines in 4 locations

Tests/Beanstalkd/JobManagerTest.php 1 location

@@ 46-56 (lines=11) @@
43
        parent::setUpBeforeClass();
44
    }
45
46
    public function testGetJobByWorker()
47
    {
48
        $failed = false;
49
        try {
50
            self::$jobManager->getJob(self::$worker->getName());
51
            $failed = true;
52
        } catch (\Exception $exception) {
53
            self::assertTrue(true);
54
        }
55
        self::assertFalse($failed);
56
    }
57
}
58

Tests/Model/BaseJobManagerTest.php 1 location

@@ 149-159 (lines=11) @@
146
    /**
147
     * @param string $method
148
     */
149
    protected function expectingException($method)
150
    {
151
        $failed = false;
152
        try {
153
            self::$jobManager->$method();
154
            $failed = true;
155
        } catch (\Exception $exception) {
156
            self::assertTrue(true);
157
        }
158
        self::assertFalse($failed);
159
    }
160
161
    /**
162
     * @outputBuffering disabled

Tests/RabbitMQ/JobManagerTest.php 1 location

@@ 134-144 (lines=11) @@
131
        self::$jobManager->getJob();
132
    }
133
134
    public function testGetJobByWorker()
135
    {
136
        $failed = false;
137
        try {
138
            self::$jobManager->getJob(self::$worker->getName());
139
            $failed = true;
140
        } catch (\Exception $exception) {
141
            self::assertTrue(true);
142
        }
143
        self::assertFalse($failed);
144
    }
145
146
    public function testExpiredJob()
147
    {

Tests/Model/JobTest.php 1 location

@@ 26-36 (lines=11) @@
23
        $this->callSetArgs($job, array(1, array($job)));
24
    }
25
26
    protected function callSetArgs(Job $job, $args)
27
    {
28
        $failed = false;
29
        try {
30
            $job->setArgs($args);
31
            $failed = true;
32
        } catch (\Exception $e) {
33
            self::assertTrue(true);
34
        }
35
        self::assertFalse($failed);
36
    }
37
38
    public function testGettersSetters()
39
    {