Passed
Push — master ( d73353...001bdc )
by Aimeos
18:49 queued 06:32
created

SymfonyTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGet() 0 4 1
A setUp() 0 9 2
1
<?php
2
3
/**
4
 * @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
5
 * @copyright Aimeos (aimeos.org), 2024
6
 */
7
8
9
namespace Aimeos\Base\Mail\Manager;
10
11
12
class SymfonyTest extends \PHPUnit\Framework\TestCase
13
{
14
	private $mock;
15
16
17
	protected function setUp() : void
18
	{
19
		if( !interface_exists( 'Symfony\Component\Mailer\MailerInterface' ) ) {
20
			$this->markTestSkipped( 'Class Symfony\Component\Mailer\MailerInterface not found' );
21
		}
22
23
		$this->mock = $this->getMockBuilder( 'Symfony\Component\Mailer\MailerInterface' )
24
			->disableOriginalConstructor()
25
			->getMock();
26
	}
27
28
29
	public function testGet()
30
	{
31
		$object = new \Aimeos\Base\Mail\Manager\Symfony( fn() => $this->mock );
32
		$this->assertInstanceOf( \Aimeos\Base\Mail\Iface::class, $object->get( '' ) );
33
	}
34
}
35