NullLanguageDetectorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testCanConstruct() 0 7 1
A testIsStopWord() 0 8 1
1
<?php
2
3
namespace Onoi\Tesa\Tests\LanguageDetector;
4
5
use Onoi\Tesa\LanguageDetector\NullLanguageDetector;
6
7
/**
8
 * @covers \Onoi\Tesa\LanguageDetector\NullLanguageDetector
9
 * @group onoi-tesa
10
 *
11
 * @license GNU GPL v2+
12
 * @since 0.1
13
 *
14
 * @author mwjames
15
 */
16
class NullLanguageDetectorTest extends \PHPUnit_Framework_TestCase {
17
18
	public function testCanConstruct() {
19
20
		$this->assertInstanceOf(
21
			'\Onoi\Tesa\LanguageDetector\NullLanguageDetector',
22
			new NullLanguageDetector()
23
		);
24
	}
25
26
	public function testIsStopWord() {
27
28
		$instance = new NullLanguageDetector();
29
30
		$this->assertNull(
31
			$instance->detect( 'Foo' )
32
		);
33
	}
34
35
}
36