Test Failed
Push — 1.0.0-dev ( dc6bfa...14bd99 )
by nguereza
02:55
created

runPrivateOrProtectedMethod()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 4
c 1
b 1
f 0
nc 1
nop 3
dl 0
loc 5
rs 10
1
<?php
2
3
	/**
4
	* Function to test private & protected method
5
	*/
6
	function run_private_protected_method($object, $method, array $args = array()){
7
		$r = new ReflectionClass(get_class($object));
8
		$m = $r->getMethod($method);
9
		$m->setAccessible(true);
10
		return $m->invokeArgs($object, $args);
11
	}
12
    
13
    /**
14
	* Function to return the correct database configuration
15
	*/
16
    function get_db_config(){
17
        return array(
18
                    'driver'    =>  'sqlite',
19
                    'database'  =>  TESTS_PATH . 'assets/db_tests.db',
20
                    'charset'   => 'utf8',
21
                    'collation' => 'utf8_general_ci',
22
                );
23
    }