ZendTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 14
dl 0
loc 27
rs 10
c 0
b 0
f 0
wmc 3

1 Method

Rating   Name   Duplication   Size   Complexity  
A testZend() 0 25 3
1
<?php
2
3
namespace Aimeos\Perf\Config;
4
5
6
/**
7
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
8
 * @copyright Metaways Infosystems GmbH, 2013
9
 * @copyright Aimeos (aimeos.org), 2014-2018
10
 */
11
class ZendTest extends \PHPUnit\Framework\TestCase
0 ignored issues
show
Bug introduced by
The type PHPUnit\Framework\TestCase was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
12
{
13
	public function testZend()
14
	{
15
		if( class_exists( 'Zend_Config' ) === false ) {
16
			$this->markTestSkipped( 'Class \Zend_Config not found' );
17
		}
18
19
20
		$start = microtime( true );
21
22
		$paths = array(
23
			__DIR__ . DIRECTORY_SEPARATOR . 'one',
24
			__DIR__ . DIRECTORY_SEPARATOR . 'two',
25
		);
26
27
		for( $i = 0; $i < 1000; $i++ )
28
		{
29
			$conf = new \Aimeos\MW\Config\Zend( new \Zend_Config( [], true ), $paths );
0 ignored issues
show
Bug introduced by
The type Zend_Config was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
30
31
			$conf->get( 'test/db/host' );
32
			$conf->get( 'test/db/username' );
33
			$conf->get( 'test/db/password' );
34
		}
35
36
		$stop = microtime( true );
37
		echo "\n    config zend: " . ( ( $stop - $start ) * 1000 ) . " msec\n";
38
	}
39
}
40