Passed
Push — master ( e985b5...b70995 )
by Aimeos
03:29
created

StandardTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 36
rs 10
wmc 5

5 Methods

Rating   Name   Duplication   Size   Complexity  
A tearDown() 0 3 1
A setUp() 0 6 1
A testGetDescription() 0 3 1
A testRun() 0 3 1
A testGetName() 0 3 1
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2023
6
 */
7
8
9
namespace Aimeos\Controller\Jobs\Basket\Cleanup;
10
11
12
class StandardTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $object;
15
	private $context;
16
17
18
	protected function setUp() : void
19
	{
20
		$aimeos = \TestHelper::getAimeos();
21
		$this->context = \TestHelper::context();
22
23
		$this->object = new \Aimeos\Controller\Jobs\Basket\Cleanup\Standard( $this->context, $aimeos );
24
	}
25
26
27
	protected function tearDown() : void
28
	{
29
		unset( $this->object, $this->context );
30
	}
31
32
33
	public function testGetName()
34
	{
35
		$this->assertEquals( 'Cleanup baskets', $this->object->getName() );
36
	}
37
38
39
	public function testGetDescription()
40
	{
41
		$this->assertEquals( 'Removes the old baskets from the database', $this->object->getDescription() );
42
	}
43
44
45
	public function testRun()
46
	{
47
		$this->object->run();
48
	}
49
}
50