Completed
Pull Request — master (#49)
by
unknown
34:35 queued 19:39
created

TicketCreationCest::provideTicketData()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.8333
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace hipanel\modules\ticket\tests\acceptance\Seller;
4
5
use hipanel\helpers\Url;
6
use Codeception\Example;
7
use hipanel\tests\_support\Step\Acceptance\Admin;
8
use hipanel\modules\ticket\tests\_support\Page\ticket\Create;
9
10
class TicketCreationCest
11
{
12
    /**
13
     * @dataProvider provideTicketData
14
     */
15
    public function ensureICanCreateTicket(Admin $I, Example $example): void
16
    {
17
        $I->login();
18
        $this->createTicket($I, $example);
19
    }
20
21
    private function createTicket(Admin $I,Example $exampleTicket): void 
22
    {
23
        $createPage = new Create($I);
24
        $exampleArray = iterator_to_array($exampleTicket->getIterator());
25
        $createPage->createTicket($exampleArray);
26
    }
27
28
    private function provideTicketData(): array
0 ignored issues
show
Unused Code introduced by
This method is not used, and could be removed.
Loading history...
29
    {
30
        return [
31
            'ticket' => [
32
                'subject' => uniqid(),
33
                'message' => 'someone abuses uniqid ' . uniqid(),
34
                'topic'   => [
35
                    'topics'   => 'Abuse',
36
                    'reciever' => 'hipanel_test_admin',
37
                ],
38
            ],
39
        ];
40
    }
41
}
42