Completed
Push — master ( b1429f...c90bf9 )
by Aimeos
16:18
created

SupportTest::testCheckGroup()   A

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 SupportTest extends AimeosTestAbstract
4
{
5
	public function testCheckUserGroup()
6
	{
7
		$context = $this->app->make( '\Aimeos\Shop\Base\Context' );
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
18
	public function testGetGroups()
19
	{
20
		$context = $this->app->make( '\Aimeos\Shop\Base\Context' );
21
		$locale = $this->app->make( '\Aimeos\Shop\Base\Locale' );
22
23
		$ctx = $context->get( false );
24
		$ctx->setLocale( $locale->getBackend( $ctx, 'unittest' ) );
25
26
		$object = new \Aimeos\Shop\Base\Support( $context, $locale );
27
28
		$this->assertEquals( array(), $object->getGroups( $ctx ) );
29
	}
30
}
31