Issues (43)

Tests/Unit/Base/ConfigTest.php (1 issue)

Labels
Severity
1
<?php
2
3
4
namespace Aimeos\Shop\Tests\Unit\Base;
5
6
7
class ConfigTest extends \Neos\Flow\Tests\UnitTestCase
0 ignored issues
show
The type Neos\Flow\Tests\UnitTestCase 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...
8
{
9
	private $object;
10
11
12
	public function setUp()
13
	{
14
		$this->object = new \Aimeos\Shop\Base\Config();
15
16
		$aimeos = new \Aimeos\Shop\Base\Aimeos();
17
18
		$resource = array(
19
			'host' => '127.0.0.1',
20
			'dbname' => 'flow',
21
			'user' => 'root',
22
			'password' => '',
23
		);
24
25
		$settings = array(
26
			'backend' => array( 'test' => 1 ),
27
			'frontend' => array( 'test' => 0 ),
28
		);
29
30
		$this->inject( $this->object, 'aimeos', $aimeos );
31
		$this->inject( $this->object, 'resource', $resource );
32
		$this->inject( $this->object, 'settings', $settings );
33
	}
34
35
36
	/**
37
	 * @test
38
	 */
39
	public function getFrontend()
40
	{
41
		$config = $this->object->get();
42
43
		$this->assertInstanceOf( '\Aimeos\MW\Config\Iface', $config );
44
		$this->assertEquals( 0, $config->get( 'test', -1 ) );
45
	}
46
47
48
	/**
49
	 * @test
50
	 */
51
	public function getBackend()
52
	{
53
		$config = $this->object->get( 'backend' );
54
55
		$this->assertInstanceOf( '\Aimeos\MW\Config\Iface', $config );
56
		$this->assertEquals( 1, $config->get( 'test', -1 ) );
57
	}
58
}