|
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 DevelopmentControllerTest extends BootstrapTestSuite |
|
15
|
|
|
{ |
|
16
|
|
|
public function testDevelopmentMain() |
|
17
|
|
|
{ |
|
18
|
|
|
$objs = $this->setupTest('/development/'); |
|
19
|
|
|
$crawler = $objs['crawler']; |
|
20
|
|
|
|
|
21
|
|
|
// Title Check |
|
22
|
|
|
$this->assertTrue(strpos(($crawler->filter('title')->first()->text()), 'Development') !== false, 'Title contains Development'); |
|
23
|
|
|
|
|
24
|
|
|
// Content Check |
|
25
|
|
|
$this->assertTrue($crawler->filter('html:contains("bug tracker, testing infrastructure, a wiki, a discussion board and various other helpful development tools. Visit this site to get involved in phpBB development.")')->count() > 0, 'Development Home Content Check'); |
|
26
|
|
|
|
|
27
|
|
|
// Sidebar Check |
|
28
|
|
|
//$this->assertTrue($crawler->filter('html:contains("To receive information on new releases of phpBB as they become available you are advised to subscribe to our mailing list.")')->count() > 0, 'Development Home Sidebar Check 1'); |
|
29
|
|
|
$this->assertTrue($crawler->filter('html:contains("Designing prosilver")')->count() > 0, 'Development Home Sidebar Check 2'); |
|
30
|
|
|
$this->assertTrue($crawler->filter('html:contains("check out our sponsor")')->count() > 0, 'Development Home Sidebar Check 3'); |
|
31
|
|
|
$this->assertTrue($crawler->filter('div.carbonad')->count() == 1, 'Check for Carbon Ads'); |
|
32
|
|
|
|
|
33
|
|
|
// Standard All Page Checks |
|
34
|
|
|
$this->globalTests(); |
|
35
|
|
|
|
|
36
|
|
|
// @TODO Test the Release Notification Box |
|
37
|
|
|
} |
|
38
|
|
|
|
|
39
|
|
|
public function testDevelopmentProsilver() |
|
40
|
|
|
{ |
|
41
|
|
|
$objs = $this->setupTest('/development/prosilver/'); |
|
42
|
|
|
$crawler = $objs['crawler']; |
|
43
|
|
|
|
|
44
|
|
|
// Title Check |
|
45
|
|
|
$this->assertTrue(strpos(($crawler->filter('title')->first()->text()), 'Designing Prosilver') !== false, 'Title contains Designing Prosilver'); |
|
46
|
|
|
|
|
47
|
|
|
// Content Check |
|
48
|
|
|
$this->assertTrue($crawler->filter('html:contains("Designing prosilver")')->count() > 0, 'Prosilver Header Check'); |
|
49
|
|
|
$this->assertTrue($crawler->filter('html:contains("Moving the info panel to the right-hand side so the focus is on the post content")')->count() > 0, 'Prosilver Page 1 Check'); |
|
50
|
|
|
$this->assertTrue($crawler->filter('html:contains("July 2004: New smilies")')->count() > 0, 'Prosilver Sidebar Check'); |
|
51
|
|
|
$this->assertTrue($crawler->filter('html:contains("February 2006: phpBB3 website")')->count() > 0, 'Prosilver Sidebar Check 2'); |
|
52
|
|
|
$this->assertTrue($crawler->filter('a:contains("July 2004: New smilies")')->count() > 0, 'Prosilver Sidebar '); |
|
53
|
|
|
|
|
54
|
|
|
// Standard All Page Checks |
|
55
|
|
|
$this->globalTests(); |
|
56
|
|
|
|
|
57
|
|
|
// @TODO Check for Images |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public function testDevelopmentProsilverSpecificPage() |
|
61
|
|
|
{ |
|
62
|
|
|
$objs = $this->setupTest('/development/prosilver/2'); |
|
63
|
|
|
$crawler = $objs['crawler']; |
|
64
|
|
|
|
|
65
|
|
|
// Title Check |
|
66
|
|
|
$this->assertTrue(strpos(($crawler->filter('title')->first()->text()), 'Designing Prosilver') !== false, 'Title contains Designing Prosilver'); |
|
67
|
|
|
|
|
68
|
|
|
// Content Check |
|
69
|
|
|
$this->assertTrue($crawler->filter('html:contains("Designing prosilver")')->count() > 0, 'Prosilver Specific Page Header Check'); |
|
70
|
|
|
$this->assertTrue($crawler->filter('html:contains("Started to think about how the admin layout could be better organised. An exciting thing to do on Valentines day I know")')->count() > 0, 'Prosilver Specific Page 1 Check'); |
|
71
|
|
|
$this->assertTrue($crawler->filter('html:contains("July 2004: New smilies")')->count() > 0, 'Prosilver Specific Page Sidebar Check'); |
|
72
|
|
|
$this->assertTrue($crawler->filter('html:contains("February 2006: phpBB3 website")')->count() > 0, 'Prosilver Specific Page Sidebar Check 2'); |
|
73
|
|
|
$this->assertTrue($crawler->filter('a:contains("July 2004: New smilies")')->count() > 0, 'Prosilver Specific Page Sidebar '); |
|
74
|
|
|
|
|
75
|
|
|
// Standard All Page Checks |
|
76
|
|
|
$this->globalTests(); |
|
77
|
|
|
} |
|
78
|
|
|
} |
|
79
|
|
|
|