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

QueryTest::testSetGetFacets()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 11
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
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;
13
14
use StingerSoft\EntitySearchBundle\Model\Query;
15
use StingerSoft\EntitySearchBundle\Model\Document;
16
17
class QueryTest extends \PHPUnit_Framework_TestCase {
18
19
	public function testSetGetFacets() {
20
		$query = new Query();
21
		$facets = array(
22
			Document::FIELD_AUTHOR => array(
23
				'Oliver Kotte',
24
				'Florian Meyer' 
25
			) 
26
		);
27
		$query->setFacets($facets);
28
		$this->assertEquals($facets, $query->getFacets());
29
	}
30
	
31
	public function testSetGetUsedFacets() {
32
		$query = new Query();
33
		$facets = array(
34
			Document::FIELD_AUTHOR,
35
		);
36
		$query->setUsedFacets($facets);
37
		$this->assertEquals($facets, $query->getUsedFacets());
38
	}
39
40
	public function testMagicMethods() {
41
		$facets = array(
42
			Document::FIELD_AUTHOR => array(
43
				'Oliver Kotte',
44
				'Florian Meyer'
45
			)
46
		);
47
		$query = new Query(null, $facets);
48
		
49
		$this->assertTrue($query->__isset('facet_'.Document::FIELD_AUTHOR));
50
		$this->assertEquals($facets[Document::FIELD_AUTHOR], $query->__get('facet_'.Document::FIELD_AUTHOR));
51
		
52
		$this->assertTrue($query->__isset('facet_'.Document::FIELD_CONTENT));
53
		$this->assertEmpty($query->__get('facet_'.Document::FIELD_CONTENT));
54
		
55
		$this->assertFalse($query->__isset('WrongPrefixedPropety'));
56
		$this->assertNull($query->__get('WrongPrefixedPropety'));
57
		
58
		$query->__set('facet_'.Document::FIELD_EDITORS, $facets[Document::FIELD_AUTHOR]);
59
		$this->assertEquals($facets[Document::FIELD_AUTHOR], $query->__get('facet_'.Document::FIELD_EDITORS));
60
		
61
		
62
		
63
	}
64
}