GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 491c83...9c1c8e )
by Florian
02:38
created

FacetSetAdapterTest   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 3
c 1
b 0
f 1
lcom 1
cbo 2
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testAddFacetValue() 0 15 2
A testGetFacet() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the Stinger Entity Search package.
5
 *
6
 * (c) Oliver Kotte <[email protected]>
7
 * (c) Florian Meyer <[email protected]>
8
 *
9
 * For the full copyright and license information, please view the LICENSE
10
 * file that was distributed with this source code.
11
 */
12
namespace StingerSoft\EntitySearchBundle\Tests\Model\Result;
13
14
use StingerSoft\EntitySearchBundle\Model\Result\FacetSetAdapter;
15
use StingerSoft\EntitySearchBundle\Model\Document;
16
17
class FacetSetAdapterTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testAddFacetValue(){
20
		$facets = new FacetSetAdapter(array());
21
		$this->assertCount(0, $facets);
22
		$facets->addFacetValue(Document::FIELD_AUTHOR, 'Oliver Kotte');
23
		$this->assertCount(1, $facets);
24
		$this->assertCount(1, $facets->getFacet(Document::FIELD_AUTHOR));
25
		$facets->addFacetValue(Document::FIELD_AUTHOR, 'Florian Meyer');
26
		$this->assertCount(1, $facets);
27
		$this->assertCount(2, $facets->getFacet(Document::FIELD_AUTHOR));
28
		
29
		foreach($facets as $facetKey => $facetValues){
30
			$this->assertEquals(Document::FIELD_AUTHOR, $facetKey);
31
			$this->assertCount(2, $facetValues);
32
		}
33
	}
34
	
35
	public function testGetFacet(){
36
		$facets = new FacetSetAdapter(array());
37
		$this->assertCount(0, $facets);
38
		$this->assertNull($facets->getFacet('NotExisting'));
39
	}
40
	
41
	
42
}