SupportControllerTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testSupportMain() 0 17 1
A testSupportIrc() 0 16 1
1
<?php
2
/**
3
 *
4
 * @copyright (c) 2013 phpBB Group
5
 * @license http://opensource.org/licenses/gpl-3.0.php GNU General Public License v3
6
 * @author MichaelC
7
 *
8
 */
9
10
namespace AppBundle\Tests\Controller;
11
12
use AppBundle\Tests\Controller;
13
14
class SupportControllerTest extends BootstrapTestSuite
15
{
16
	public function testSupportMain()
17
	{
18
		$objs = $this->setupTest('/support/');
19
		$crawler = $objs['crawler'];
20
21
		// Title Check
22
		$this->assertTrue(strpos(($crawler->filter('title')->first()->text()), 'Support') !== false, 'Title contains Support');
23
24
		// Content Check
25
		$this->assertTrue($crawler->filter('html:contains("Having installation problems? Is the database giving you trouble?")')->count() > 0, 'Support Home Content Check');
26
		$this->assertTrue($crawler->filter('a:contains("Code Changes")')->count() > 0, 'Support Home Sidebar Check');
27
		//$this->assertTrue($crawler->filter('html:contains("To receive information on new releases of phpBB as they become available you are")')->count() > 0, 'Support Home Sidebar Check 2');
28
		$this->assertTrue($crawler->filter('a:contains("Bug Tracker")')->count() > 0, 'About Home Sidebar Check 3');
29
30
		// Standard All Page Checks
31
		$this->globalTests();
32
	}
33
34
	public function testSupportIrc()
35
	{
36
		$objs = $this->setupTest('/support/irc/');
37
		$crawler = $objs['crawler'];
38
39
		// Title Check
40
		$this->assertTrue(strpos(($crawler->filter('title')->first()->text()), 'IRC Support') !== false, 'Title contains IRC Support');
41
42
		// Content Check
43
		$this->assertTrue($crawler->filter('html:contains("The main phpBB IRC channel is")')->count() > 0, 'Support IRC Content Check');
44
		$this->assertTrue($crawler->filter('a:contains("Code Changes")')->count() > 0, 'Support IRC Sidebar Check');
45
		$this->assertTrue($crawler->filter('html:contains("check out our sponsor")')->count() > 0, 'Support IRC Sidebar Check 2');
46
47
		// Standard All Page Checks
48
		$this->globalTests();
49
	}
50
}
51