LocaleTest::testGetBackend()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
class LocaleTest extends AimeosTestAbstract
4
{
5
	public function testGetBackend()
6
	{
7
		$mock = $this->getMockBuilder( '\Illuminate\Config\Repository' )->getMock();
8
		$context = $this->app->make( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' );
0 ignored issues
show
Bug introduced by
The method make() does not exist on null. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

8
		$context = $this->app->/** @scrutinizer ignore-call */ make( '\Aimeos\Shop\Base\Context' )->get( false, 'backend' );

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
9
10
		$object = new \Aimeos\Shop\Base\Locale( $mock );
11
12
		$this->assertInstanceOf( '\Aimeos\MShop\Locale\Item\Iface', $object->getBackend( $context, 'unittest' ) );
13
	}
14
}
15