Passed
Push — master ( a59ecb...8091ff )
by Aimeos
23:24 queued 18:06
created

SessionTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * @license LGPLv3, https://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2016-2023
6
 */
7
8
9
namespace Aimeos\MShop\Order\Manager;
10
11
12
class SessionTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
16
17
	protected function setUp() : void
18
	{
19
		$this->object = new \Aimeos\MShop\Order\Manager\Standard( \TestHelper::context() );
20
	}
21
22
23
	protected function tearDown() : void
24
	{
25
		unset( $this->object );
26
	}
27
28
29
	public function testGetSetSession()
30
	{
31
		$order = $this->object->create();
32
		$order->setComment( 'test comment' );
33
34
		$this->object->setSession( $order, 'test' );
35
		$session = $this->object->getSession( 'test' );
36
37
		$this->assertInstanceOf( \Aimeos\MShop\Order\Item\Iface::class, $session );
38
		$this->assertEquals( 'test comment', $order->getComment() );
39
		$this->assertEquals( $order, $session );
40
	}
41
}
42