Completed
Push — master ( 8d2de8...1ce70a )
by Litera
17s
created

AllPagesCest::ensure_that_settings_works()   A

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
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class must be in a namespace of at least one level to avoid collisions.

You can fix this by adding a namespace to your class:

namespace YourVendor;

class YourClass { }

When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.

Loading history...
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');
0 ignored issues
show
Unused Code Comprehensibility introduced by
62% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

Loading history...
26
	{
27
		$I = $this->logIn($I);
28
		$I->wantTo('ensure that frontpage works');
29
		//$I->setCookie( 'vodni.skauting.local', $this->cookie );
0 ignored issues
show
Unused Code Comprehensibility introduced by
65% of this comment could be valid code. Did you maybe forget this after debugging?

Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.

The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.

This check looks for comments that seem to be mostly valid code and reports them.

Loading history...
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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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...
Coding Style introduced by
This method is not in camel caps format.

This check looks for method names that are not 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 seeker becomes databaseConnectionSeeker.

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