Test Setup Failed
Pull Request — master (#7)
by Matthew
14:04
created

JobManagerTest::setUpBeforeClass()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 13
nc 1
nop 0
1
<?php
2
3
namespace Dtc\QueueBundle\Tests\Beanstalkd;
4
5
use Dtc\QueueBundle\Beanstalkd\JobManager;
6
use Dtc\QueueBundle\Tests\FibonacciWorker;
7
use Dtc\QueueBundle\Tests\Model\BaseJobManagerTest;
8
use Pheanstalk\Pheanstalk;
9
10
/**
11
 * @author David
12
 *
13
 * This test requires local beanstalkd running
14
 */
15
class JobManagerTest extends BaseJobManagerTest
16
{
17
    public static $beanstalkd;
18
19
    public static function setUpBeforeClass()
20
    {
21
        $host = 'localhost';
22
        $className = 'Dtc\QueueBundle\Beanstalkd\Job';
23
24
        self::$beanstalkd = new Pheanstalk($host);
25
26
        self::$jobManager = new JobManager(self::$beanstalkd);
0 ignored issues
show
Unused Code introduced by
The call to JobManager::__construct() has too many arguments starting with self::$beanstalkd.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
27
        self::$worker = new FibonacciWorker();
28
        self::$worker->setJobClass($className);
29
30
        parent::setUpBeforeClass();
31
    }
32
}
33