Completed
Push — master ( 19dece...05a825 )
by Tobias
04:22
created

database_test::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace tas2580\seourls\tests\base;
4
5
abstract class database_test extends \phpbb_database_test_case
6
{
7
	static protected function setup_extensions()
0 ignored issues
show
Coding Style introduced by
As per PSR2, the static declaration should come after the visibility declaration.
Loading history...
8
	{
9
		return array('tas2580/seourls');
10
	}
11
	protected $db;
12
	public function setUp()
13
	{
14
		parent::setUp();
15
		global $db;
0 ignored issues
show
Compatibility Best Practice introduced by
Use of global functionality is not recommended; it makes your code harder to test, and less reusable.

Instead of relying on global state, we recommend one of these alternatives:

1. Pass all data via parameters

function myFunction($a, $b) {
    // Do something
}

2. Create a class that maintains your state

class MyClass {
    private $a;
    private $b;

    public function __construct($a, $b) {
        $this->a = $a;
        $this->b = $b;
    }

    public function myFunction() {
        // Do something
    }
}
Loading history...
16
		$db = $this->db = $this->new_dbal();
17
	}
18
}