SupportTest::testCheckUserGroup()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 10
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
class SupportTest extends AimeosTestAbstract
4
{
5
	public function testCheckUserGroup()
6
	{
7
		$context = $this->app->make( '\Aimeos\Shop\Base\Context' );
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

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

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
		$locale = $this->app->make( '\Aimeos\Shop\Base\Locale' );
9
10
		$object = new \Aimeos\Shop\Base\Support( $context, $locale );
11
		$user = new \Illuminate\Foundation\Auth\User();
12
		$user->siteid = '0';
0 ignored issues
show
Bug introduced by
The property siteid does not seem to exist on Illuminate\Foundation\Auth\User. Are you sure there is no database migration missing?

Checks if undeclared accessed properties appear in database migrations and if the creating migration is correct.

Loading history...
13
14
		$this->assertFalse( $object->checkUserGroup( $user, 'admin' ) );
15
	}
16
}
17