Issues (145)

tests/Base/I18nTest.php (1 issue)

Labels
Severity
1
<?php
2
3
class I18nTest extends AimeosTestAbstract
4
{
5
	public function testGet()
6
	{
7
		$aimeos = $this->app->make( '\Aimeos\Shop\Base\Aimeos' );
0 ignored issues
show
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

7
		/** @scrutinizer ignore-call */ 
8
  $aimeos = $this->app->make( '\Aimeos\Shop\Base\Aimeos' );

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...
8
9
		$configMock = $this->getMockBuilder( '\Illuminate\Config\Repository' )
10
			->onlyMethods( array( 'get', 'has' ) )->getMock();
11
12
		$configMock->expects( $this->once() )->method( 'has' )
13
			->will( $this->returnValue( true ) );
14
15
		$configMock->expects( $this->exactly( 3 ) )->method( 'get' )
16
			->will( $this->onConsecutiveCalls( true, 'laravel:', array() ) );
17
18
		$object = new \Aimeos\Shop\Base\I18n( $configMock, $aimeos );
19
		$list = $object->get( array( 'en' ) );
20
21
		$this->assertInstanceOf( '\Aimeos\Base\Translation\Iface', $list['en'] );
22
	}
23
}
24