AllPagesCest::ensure_that_settings_works()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 5
nc 1
nop 1
dl 0
loc 7
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
class AllPagesCest
4
{
5
6
	private $cookie = null;
0 ignored issues
show
Unused Code introduced by
The property $cookie is not used and could be removed.

This check marks private properties in classes that are never used. Those properties can be removed.

Loading history...
7
8
	public function logIn(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
9
	{
10
		$I->wantTo('login to admin');
11
		$I->amOnPage('admin/');
12
		$I->seeInCurrentUrl('admin/');
13
		$I->fillField('username','tester');
14
		$I->fillField('password','tester');
15
		$I->checkOption('persistent');
16
		$I->click('Přihlásit', '#content');
17
		$I->see('Úvod');
18
		$I->see('tester');
19
		//$this->cookie = $I->grabCookie('vodni.skauting.local');
20
21
		return $I;
22
	}
23
24
	// tests
25
	public function ensure_that_frontpage_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
26
	{
27
		$I = $this->logIn($I);
28
		$I->wantTo('ensure that frontpage works');
29
		//$I->setCookie( 'vodni.skauting.local', $this->cookie );
30
		$I->amOnPage('srazvs/');
31
		$I->see('Srazy VS');
32
	}
33
34
	public function ensure_that_programs_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
35
	{
36
		$I = $this->logIn($I);
37
		$I->wantTo('ensure that programs works');
38
		$I->amOnPage('/srazvs/program/');
39
		$I->see('Správa programů');
40
	}
41
42
	public function ensure_that_visitors_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
43
	{
44
		$I = $this->logIn($I);
45
		$I->wantTo('ensure that visitors works');
46
		$I->amOnPage('/srazvs/visitor/');
47
		$I->see('Správa účastníků');
48
	}
49
50
	public function ensure_that_exports_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
51
	{
52
		$I = $this->logIn($I);
53
		$I->wantTo('ensure that exports works');
54
		$I->amOnPage('/srazvs/export/');
55
		$I->see('Exporty');
56
	}
57
58
	public function ensure_that_categories_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
59
	{
60
		$I = $this->logIn($I);
61
		$I->wantTo('ensure that categories works');
62
		$I->amOnPage('/srazvs/category/');
63
		$I->see('Správa kategorií');
64
	}
65
66
	public function ensure_that_settings_works(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
67
	{
68
		$I = $this->logIn($I);
69
		$I->wantTo('ensure that settings works');
70
		$I->amOnPage('/srazvs/settings/');
71
		$I->see('Nastavení systému');
72
	}
73
74
	public function it_should_get_error_404_on_nonexisting_page(\AcceptanceTester $I)
0 ignored issues
show
Coding Style Naming introduced by
The parameter $I is not named in camelCase.

This check marks parameter names that have not been written in camelCase.

In camelCase names are written without any punctuation, the start of each new word being marked by a capital letter. Thus the name database connection string becomes databaseConnectionString.

Loading history...
75
	{
76
		$I->amOnPage('/srazvs/registration/www.qrka.cz');
77
		$I->seeResponseCodeIs(404);
78
		$I->amOnPage('/srazvs/program/www.qrka.cz');
79
		$I->seeResponseCodeIs(404);
80
	}
81
82
}
83