Completed
Push — master ( d48601...03ac5e )
by Jeroen De
13s queued 10s
created

MessageReporterAwareTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 18
c 0
b 0
f 0
wmc 2
lcom 1
cbo 2
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testTrait() 0 9 1
A getMessageReporter() 0 3 1
1
<?php
2
3
namespace Onoi\MessageReporter\Tests\Unit;
4
5
use Onoi\MessageReporter\MessageReporterAware;
6
use Onoi\MessageReporter\MessageReporterAwareTrait;
7
use Onoi\MessageReporter\NullMessageReporter;
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * @group onoi-message-reporter
12
 *
13
 * @license GNU GPL v2+
14
 * @since 1.3
15
 *
16
 * @author mwjames
17
 */
18
class MessageReporterAwareTest extends TestCase implements MessageReporterAware {
19
	use MessageReporterAwareTrait;
20
21
	public function testTrait() {
22
23
		$this->setMessageReporter( new NullMessageReporter() );
24
25
		$this->assertInstanceOf(
26
			NullMessageReporter::class,
27
			$this->getMessageReporter()
28
		);
29
	}
30
31
	public function getMessageReporter() {
32
		return $this->messageReporter;
33
	}
34
35
}
36