Issues (441)

site/tests/_pages/ContactPage.php (1 issue)

1
<?php
2
3
namespace tests\codeception\site\_pages;
4
5
use yii\codeception\BasePage;
0 ignored issues
show
The type yii\codeception\BasePage was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * Represents contact page
9
 * @property \codeception_site\AcceptanceTester|\codeception_site\FunctionalTester $actor
10
 */
11
class ContactPage extends BasePage
12
{
13
    public $route = 'site/contact';
14
15
    /**
16
     * @param array $contactData
17
     */
18
    public function submit(array $contactData)
19
    {
20
        foreach ($contactData as $field => $value) {
21
            $inputType = $field === 'body' ? 'textarea' : 'input';
22
            $this->actor->fillField($inputType . '[name="ContactForm[' . $field . ']"]', $value);
23
        }
24
        $this->actor->click('contact-button');
25
    }
26
}
27