literat /
srazvs
This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
| 1 | <?php |
||
| 2 | |||
| 3 | class BlockCest extends CestCase |
||
| 4 | { |
||
| 5 | |||
| 6 | private $simpleBlock = [ |
||
| 7 | 'fields' => [ |
||
| 8 | 'name' => 'testing block', |
||
| 9 | ], |
||
| 10 | 'options' => [ |
||
| 11 | 'day' => 'sobota', |
||
| 12 | 'start_hour' => '10', |
||
| 13 | 'end_hour' => '12', |
||
| 14 | 'start_minute' => '15', |
||
| 15 | 'end_minute' => '30', |
||
| 16 | ], |
||
| 17 | ]; |
||
| 18 | |||
| 19 | private $fullBlock = [ |
||
| 20 | 'fields' => [ |
||
| 21 | 'name' => 'testing block', |
||
| 22 | "//textarea[@name='description']" => 'testování', |
||
| 23 | 'tutor' => 'Tester Testovič', |
||
| 24 | 'email' => '[email protected]', |
||
| 25 | 'capacity' => 1, |
||
| 26 | ], |
||
| 27 | 'options' => [ |
||
| 28 | 'day' => 'sobota', |
||
| 29 | 'start_hour' => '10', |
||
| 30 | 'end_hour' => '12', |
||
| 31 | 'start_minute' => '15', |
||
| 32 | 'end_minute' => '30', |
||
| 33 | 'program' => 1, |
||
| 34 | 'display_progs' => 0, |
||
| 35 | 'category' => 1, |
||
| 36 | ], |
||
| 37 | ]; |
||
| 38 | |||
| 39 | public function _before(AcceptanceTester $I) |
||
|
0 ignored issues
–
show
|
|||
| 40 | { |
||
| 41 | $I->wantTo('login to admin'); |
||
| 42 | $I->amOnPage('admin/'); |
||
| 43 | $I->seeInCurrentUrl('admin/'); |
||
| 44 | $I->fillField('username','tester'); |
||
| 45 | $I->fillField('password','tester'); |
||
| 46 | $I->checkOption('persistent'); |
||
| 47 | $I->click('Přihlásit', '#content'); |
||
| 48 | $I->see('Úvod'); |
||
| 49 | $I->see('tester'); |
||
| 50 | } |
||
| 51 | |||
| 52 | public function _after(AcceptanceTester $I) |
||
|
0 ignored issues
–
show
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 Loading history...
|
|||
| 53 | { |
||
| 54 | } |
||
| 55 | |||
| 56 | // tests |
||
| 57 | public function ensure_that_blocks_works(\AcceptanceTester $I) |
||
|
0 ignored issues
–
show
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 Loading history...
|
|||
| 58 | { |
||
| 59 | $I->wantTo('Ensure that blocks works'); |
||
| 60 | $I->amOnPage('/srazvs/block/'); |
||
| 61 | $I->see('Správa bloků'); |
||
| 62 | } |
||
| 63 | |||
| 64 | public function ensure_that_creating_works(\AcceptanceTester $I) |
||
|
0 ignored issues
–
show
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 Loading history...
|
|||
| 65 | { |
||
| 66 | $I->wantTo('Ensure that blocks creating works'); |
||
| 67 | $I->amOnPage('/srazvs/block/'); |
||
| 68 | $I->see('Správa bloků'); |
||
| 69 | $I->click('NOVÝ BLOK'); |
||
| 70 | $I->see('nový blok'); |
||
| 71 | $I->see('Název:'); |
||
| 72 | $I->see('Den:'); |
||
| 73 | $I->see('Od:'); |
||
| 74 | $I->see('Do:'); |
||
| 75 | $I->see('Popis:'); |
||
| 76 | $I->see('Lektor:'); |
||
| 77 | $I->see('E-mail:'); |
||
| 78 | $I->see('Programový blok:'); |
||
| 79 | $I->see('Nezobrazovat programy:'); |
||
| 80 | $I->see('Kapacita:'); |
||
| 81 | $I->see('Kategorie:'); |
||
| 82 | } |
||
| 83 | |||
| 84 | View Code Duplication | public function it_should_create_simple_block(\AcceptanceTester $I) |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
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 Loading history...
|
|||
| 85 | { |
||
| 86 | $I->amOnPage('/srazvs/block/'); |
||
| 87 | $I->see('Správa bloků'); |
||
| 88 | $I->wantTo('Create new block with basic data'); |
||
| 89 | $I->click('NOVÝ BLOK', '#content'); |
||
| 90 | $I->seeCurrentUrlMatches('~/srazvs/block/new~'); |
||
| 91 | $this->fillForm($I, $this->simpleBlock); |
||
| 92 | $I->click('Uložit', '#content'); |
||
| 93 | $I->seeInCurrentUrl('/srazvs/block'); |
||
| 94 | } |
||
| 95 | |||
| 96 | public function it_should_update_simple_block(\AcceptanceTester $I) |
||
|
0 ignored issues
–
show
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 Loading history...
|
|||
| 97 | { |
||
| 98 | } |
||
| 99 | |||
| 100 | View Code Duplication | public function it_should_create_full_block(\AcceptanceTester $I) |
|
|
0 ignored issues
–
show
This method seems to be duplicated in your project.
Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation. You can also find more detailed suggestions in the “Code” section of your repository. Loading history...
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 Loading history...
|
|||
| 101 | { |
||
| 102 | $I->amOnPage('/srazvs/block/'); |
||
| 103 | $I->see('Správa bloků'); |
||
| 104 | $I->wantTo('Create new block with all data'); |
||
| 105 | $I->click('NOVÝ BLOK', '#content'); |
||
| 106 | $I->seeCurrentUrlMatches('~/srazvs/block/new~'); |
||
| 107 | $this->fillForm($I, $this->fullBlock); |
||
| 108 | $I->click('Uložit', '#content'); |
||
| 109 | $I->seeInCurrentUrl('/srazvs/block?error=ok'); |
||
| 110 | } |
||
| 111 | |||
| 112 | public function it_should_update_full_block(\AcceptanceTester $I) |
||
|
0 ignored issues
–
show
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 Loading history...
|
|||
| 113 | { |
||
| 114 | } |
||
| 115 | |||
| 116 | } |
||
| 117 |
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.