Issues (145)

tests/Base/ContextTest.php (1 issue)

Labels
Severity
1
<?php
2
3
class ContextTest extends AimeosTestAbstract
4
{
5
	public function testGetNoLocale()
6
	{
7
		$session = $this->getMockBuilder( '\Illuminate\Session\Store' )->disableOriginalConstructor()->getMock();
8
		$config = $this->app->make( '\Aimeos\Shop\Base\Config' );
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

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

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
		$locale = $this->app->make( '\Aimeos\Shop\Base\Locale' );
10
		$i18n = $this->app->make( '\Aimeos\Shop\Base\I18n' );
11
12
		$object = new \Aimeos\Shop\Base\Context( $session, $config, $locale, $i18n );
13
		$ctx = $object->get( false );
14
15
		$this->assertInstanceOf( '\Aimeos\MShop\ContextIface', $ctx );
16
		$this->assertIsArray( $ctx->groups() );
17
	}
18
}
19