Completed
Push — pull-request/8600 ( 367a7c )
by Kamil
56:28 queued 34:06
created

ManagingCustomersContext::iChangeTheirEmailTo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
declare(strict_types=1);
13
14
namespace Sylius\Behat\Context\Ui\Admin;
15
16
use Behat\Behat\Context\Context;
17
use Sylius\Behat\Page\Admin\Crud\IndexPageInterface;
18
use Sylius\Behat\Page\Admin\Customer\CreatePageInterface;
19
use Sylius\Behat\Page\Admin\Customer\ShowPageInterface;
20
use Sylius\Behat\Page\Admin\Customer\UpdatePageInterface;
21
use Sylius\Behat\Service\Resolver\CurrentPageResolverInterface;
22
use Sylius\Component\Core\Model\CustomerInterface;
23
use Webmozart\Assert\Assert;
24
25
/**
26
 * @author Anna Walasek <[email protected]>
27
 */
28
final class ManagingCustomersContext implements Context
29
{
30
    /**
31
     * @var IndexPageInterface
32
     */
33
    private $indexPage;
34
35
    /**
36
     * @var CreatePageInterface
37
     */
38
    private $createPage;
39
40
    /**
41
     * @var UpdatePageInterface
42
     */
43
    private $updatePage;
44
45
    /**
46
     * @var ShowPageInterface
47
     */
48
    private $showPage;
49
50
    /**
51
     * @var IndexPageInterface
52
     */
53
    private $ordersIndexPage;
54
55
    /**
56
     * @var CurrentPageResolverInterface
57
     */
58
    private $currentPageResolver;
59
60
    /**
61
     * @param CreatePageInterface $createPage
62
     * @param IndexPageInterface $indexPage
63
     * @param UpdatePageInterface $updatePage
64
     * @param ShowPageInterface $showPage
65
     * @param IndexPageInterface $ordersIndexPage
66
     * @param CurrentPageResolverInterface $currentPageResolver
67
     */
68
    public function __construct(
69
        CreatePageInterface $createPage,
70
        IndexPageInterface $indexPage,
71
        UpdatePageInterface $updatePage,
72
        ShowPageInterface $showPage,
73
        IndexPageInterface $ordersIndexPage,
74
        CurrentPageResolverInterface $currentPageResolver
75
    ) {
76
        $this->createPage = $createPage;
77
        $this->indexPage = $indexPage;
78
        $this->updatePage = $updatePage;
79
        $this->showPage = $showPage;
80
        $this->ordersIndexPage = $ordersIndexPage;
81
        $this->currentPageResolver = $currentPageResolver;
82
    }
83
84
    /**
85
     * @Given I want to create a new customer
86
     * @Given I want to create a new customer account
87
     */
88
    public function iWantToCreateANewCustomer()
89
    {
90
        $this->createPage->open();
91
    }
92
93
    /**
94
     * @When /^I specify (?:their|his) first name as "([^"]*)"$/
95
     */
96
    public function iSpecifyItsFirstNameAs($name)
97
    {
98
        $this->createPage->specifyFirstName($name);
99
    }
100
101
    /**
102
     * @When /^I specify (?:their|his) last name as "([^"]*)"$/
103
     */
104
    public function iSpecifyItsLastNameAs($name)
105
    {
106
        $this->createPage->specifyLastName($name);
107
    }
108
109
    /**
110
     * @When I specify their email as :name
111
     * @When I do not specify their email
112
     */
113
    public function iSpecifyItsEmailAs($email = null)
114
    {
115
        $this->createPage->specifyEmail($email);
116
    }
117
118
    /**
119
     * @When I change their email to :email
120
     * @When I remove its email
121
     */
122
    public function iChangeTheirEmailTo(string $email = null): void
123
    {
124
        $this->updatePage->changeEmail($email);
125
    }
126
127
    /**
128
     * @When I add them
129
     * @When I try to add them
130
     */
131
    public function iAddIt()
132
    {
133
        $this->createPage->create();
134
    }
135
136
    /**
137
     * @Then the customer :customer should appear in the store
138
     * @Then the customer :customer should still have this email
139
     */
140
    public function theCustomerShould(CustomerInterface $customer)
141
    {
142
        $this->indexPage->open();
143
144
        Assert::true($this->indexPage->isSingleResourceOnPage(['email' => $customer->getEmail()]));
145
    }
146
147
    /**
148
     * @When I select :gender as its gender
149
     */
150
    public function iSelectGender($gender)
151
    {
152
        $this->createPage->chooseGender($gender);
153
    }
154
155
    /**
156
     * @When I select :group as their group
157
     */
158
    public function iSelectGroup($group)
159
    {
160
        $this->createPage->chooseGroup($group);
161
    }
162
163
    /**
164
     * @When I specify its birthday as :birthday
165
     */
166
    public function iSpecifyItsBirthdayAs($birthday)
167
    {
168
        $this->createPage->specifyBirthday($birthday);
169
    }
170
171
    /**
172
     * @When /^I want to edit (this customer)$/
173
     */
174
    public function iWantToEditThisCustomer(CustomerInterface $customer)
175
    {
176
        $this->updatePage->open(['id' => $customer->getId()]);
177
    }
178
179
    /**
180
     * @When I save my changes
181
     * @When I try to save my changes
182
     */
183
    public function iSaveMyChanges()
184
    {
185
        $this->updatePage->saveChanges();
186
    }
187
188
    /**
189
     * @Then /^(this customer) with name "([^"]*)" should appear in the store$/
190
     */
191
    public function theCustomerWithNameShouldAppearInTheRegistry(CustomerInterface $customer, $name)
192
    {
193
        $this->updatePage->open(['id' => $customer->getId()]);
194
195
        Assert::same($this->updatePage->getFullName(), $name);
196
    }
197
198
    /**
199
     * @When I want to see all customers in store
200
     */
201
    public function iWantToSeeAllCustomersInStore()
202
    {
203
        $this->indexPage->open();
204
    }
205
206
    /**
207
     * @Then /^I should see (\d+) customers in the list$/
208
     */
209
    public function iShouldSeeCustomersInTheList($amountOfCustomers)
210
    {
211
        Assert::same($this->indexPage->countItems(), (int) $amountOfCustomers);
212
    }
213
214
    /**
215
     * @Then I should see the customer :email in the list
216
     */
217
    public function iShouldSeeTheCustomerInTheList($email)
218
    {
219
        Assert::true($this->indexPage->isSingleResourceOnPage(['email' => $email]));
220
    }
221
222
    /**
223
     * @Then /^I should be notified that ([^"]+) is required$/
224
     */
225
    public function iShouldBeNotifiedThatFirstNameIsRequired($elementName)
226
    {
227
        Assert::same(
228
            $this->createPage->getValidationMessage($elementName),
229
            sprintf('Please enter your %s.', $elementName)
230
        );
231
    }
232
233
    /**
234
     * @Then /^I should be notified that ([^"]+) should be ([^"]+)$/
235
     */
236
    public function iShouldBeNotifiedThatTheElementShouldBe($elementName, $validationMessage)
237
    {
238
        Assert::same(
239
            $this->updatePage->getValidationMessage($elementName),
240
            sprintf('%s must be %s.', ucfirst($elementName), $validationMessage)
241
        );
242
    }
243
244
    /**
245
     * @Then the customer with email :email should not appear in the store
246
     */
247
    public function theCustomerShouldNotAppearInTheStore($email)
248
    {
249
        $this->indexPage->open();
250
251
        Assert::false($this->indexPage->isSingleResourceOnPage(['email' => $email]));
252
    }
253
254
    /**
255
     * @When I remove its first name
256
     */
257
    public function iRemoveItsFirstName()
258
    {
259
        $this->updatePage->changeFirstName('');
260
    }
261
262
    /**
263
     * @Then /^(this customer) should have an empty first name$/
264
     * @Then the customer :customer should still have an empty first name
265
     */
266
    public function theCustomerShouldStillHaveAnEmptyFirstName(CustomerInterface $customer)
267
    {
268
        $this->updatePage->open(['id' => $customer->getId()]);
269
270
        Assert::eq($this->updatePage->getFirstName(), '');
271
    }
272
273
    /**
274
     * @When I remove its last name
275
     */
276
    public function iRemoveItsLastName()
277
    {
278
        $this->updatePage->changeLastName('');
279
    }
280
281
    /**
282
     * @Then /^(this customer) should have an empty last name$/
283
     * @Then the customer :customer should still have an empty last name
284
     */
285
    public function theCustomerShouldStillHaveAnEmptyLastName(CustomerInterface $customer)
286
    {
287
        $this->updatePage->open(['id' => $customer->getId()]);
288
289
        Assert::eq($this->updatePage->getLastName(), '');
290
    }
291
292
    /**
293
     * @Then I should be notified that email is not valid
294
     */
295
    public function iShouldBeNotifiedThatEmailIsNotValid()
296
    {
297
        Assert::same($this->createPage->getValidationMessage('email'), 'This email is invalid.');
298
    }
299
300
    /**
301
     * @Then I should be notified that email must be unique
302
     */
303
    public function iShouldBeNotifiedThatEmailMustBeUnique()
304
    {
305
        Assert::same($this->createPage->getValidationMessage('email'), 'This email is already used.');
306
    }
307
308
    /**
309
     * @Then there should still be only one customer with email :email
310
     */
311
    public function thereShouldStillBeOnlyOneCustomerWithEmail($email)
312
    {
313
        $this->indexPage->open();
314
315
        Assert::true($this->indexPage->isSingleResourceOnPage(['email' => $email]));
316
    }
317
318
    /**
319
     * @Given I want to enable :customer
320
     * @Given I want to disable :customer
321
     */
322
    public function iWantToChangeStatusOf(CustomerInterface $customer)
323
    {
324
        $this->updatePage->open(['id' => $customer->getId()]);
325
    }
326
327
    /**
328
     * @When I enable their account
329
     */
330
    public function iEnableIt()
331
    {
332
        $this->updatePage->enable();
333
    }
334
335
    /**
336
     * @When I disable their account
337
     */
338
    public function iDisableIt()
339
    {
340
        $this->updatePage->disable();
341
    }
342
343
    /**
344
     * @Then /^(this customer) should be enabled$/
345
     */
346
    public function thisCustomerShouldBeEnabled(CustomerInterface $customer)
347
    {
348
        $this->indexPage->open();
349
350
        Assert::eq($this->indexPage->getCustomerAccountStatus($customer), 'Enabled');
0 ignored issues
show
Bug introduced by
It seems like you code against a concrete implementation and not the interface Sylius\Behat\Page\Admin\Crud\IndexPageInterface as the method getCustomerAccountStatus() does only exist in the following implementations of said interface: Sylius\Behat\Page\Admin\Customer\IndexPage.

Let’s take a look at an example:

interface User
{
    /** @return string */
    public function getPassword();
}

class MyUser implements User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different implementation of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the interface:

    interface User
    {
        /** @return string */
        public function getPassword();
    
        /** @return string */
        public function getDisplayName();
    }
    
Loading history...
351
    }
352
353
    /**
354
     * @Then /^(this customer) should be disabled$/
355
     */
356
    public function thisCustomerShouldBeDisabled(CustomerInterface $customer)
357
    {
358
        $this->indexPage->open();
359
360
        Assert::eq($this->indexPage->getCustomerAccountStatus($customer), 'Disabled');
0 ignored issues
show
Bug introduced by
It seems like you code against a concrete implementation and not the interface Sylius\Behat\Page\Admin\Crud\IndexPageInterface as the method getCustomerAccountStatus() does only exist in the following implementations of said interface: Sylius\Behat\Page\Admin\Customer\IndexPage.

Let’s take a look at an example:

interface User
{
    /** @return string */
    public function getPassword();
}

class MyUser implements User
{
    public function getPassword()
    {
        // return something
    }

    public function getDisplayName()
    {
        // return some name.
    }
}

class AuthSystem
{
    public function authenticate(User $user)
    {
        $this->logger->info(sprintf('Authenticating %s.', $user->getDisplayName()));
        // do something.
    }
}

In the above example, the authenticate() method works fine as long as you just pass instances of MyUser. However, if you now also want to pass a different implementation of User which does not have a getDisplayName() method, the code will break.

Available Fixes

  1. Change the type-hint for the parameter:

    class AuthSystem
    {
        public function authenticate(MyUser $user) { /* ... */ }
    }
    
  2. Add an additional type-check:

    class AuthSystem
    {
        public function authenticate(User $user)
        {
            if ($user instanceof MyUser) {
                $this->logger->info(/** ... */);
            }
    
            // or alternatively
            if ( ! $user instanceof MyUser) {
                throw new \LogicException(
                    '$user must be an instance of MyUser, '
                   .'other instances are not supported.'
                );
            }
    
        }
    }
    
Note: PHP Analyzer uses reverse abstract interpretation to narrow down the types inside the if block in such a case.
  1. Add the method to the interface:

    interface User
    {
        /** @return string */
        public function getPassword();
    
        /** @return string */
        public function getDisplayName();
    }
    
Loading history...
361
    }
362
363
    /**
364
     * @When I specify their password as :password
365
     */
366
    public function iSpecifyItsPasswordAs($password)
367
    {
368
        $this->createPage->specifyPassword($password);
369
    }
370
371
    /**
372
     * @When I choose create account option
373
     */
374
    public function iChooseCreateAccountOption()
375
    {
376
        $this->createPage->selectCreateAccount();
377
    }
378
379
    /**
380
     * @When I browse orders of a customer :customer
381
     */
382
    public function iBrowseOrdersOfACustomer(CustomerInterface $customer)
383
    {
384
        $this->ordersIndexPage->open(['id' => $customer->getId()]);
385
    }
386
387
    /**
388
     * @Then the customer :customer should have an account created
389
     * @Then /^(this customer) should have an account created$/
390
     */
391
    public function theyShouldHaveAnAccountCreated(CustomerInterface $customer)
392
    {
393
        Assert::notNull(
394
            $customer->getUser()->getPassword(),
395
            'Customer should have an account, but they do not.'
396
        );
397
    }
398
399
    /**
400
     * @When I view details of the customer :customer
401
     * @When /^I view (their) details$/
402
     */
403
    public function iViewDetailsOfTheCustomer(CustomerInterface $customer)
404
    {
405
        $this->showPage->open(['id' => $customer->getId()]);
406
    }
407
408
    /**
409
     * @Then his name should be :name
410
     */
411
    public function hisNameShouldBe($name)
412
    {
413
        Assert::same($this->showPage->getCustomerName(), $name);
414
    }
415
416
    /**
417
     * @Then he should be registered since :registrationDate
418
     */
419
    public function hisRegistrationDateShouldBe($registrationDate)
420
    {
421
        Assert::eq($this->showPage->getRegistrationDate(), new \DateTime($registrationDate));
422
    }
423
424
    /**
425
     * @Then his email should be :email
426
     */
427
    public function hisEmailShouldBe($email)
428
    {
429
        Assert::same($this->showPage->getCustomerEmail(), $email);
430
    }
431
432
    /**
433
     * @Then his phone number should be :phoneNumber
434
     */
435
    public function hisPhoneNumberShouldBe($phoneNumber)
436
    {
437
        Assert::same($this->showPage->getCustomerPhoneNumber(), $phoneNumber);
438
    }
439
440
    /**
441
     * @Then his default address should be :defaultAddress
442
     */
443
    public function hisShippingAddressShouldBe($defaultAddress)
444
    {
445
        Assert::same($this->showPage->getDefaultAddress(), str_replace(',', '', $defaultAddress));
446
    }
447
448
    /**
449
     * @Then I should see information about no existing account for this customer
450
     */
451
    public function iShouldSeeInformationAboutNoExistingAccountForThisCustomer()
452
    {
453
        Assert::true($this->showPage->hasAccount());
454
    }
455
456
    /**
457
     * @Then I should see that this customer is subscribed to the newsletter
458
     */
459
    public function iShouldSeeThatThisCustomerIsSubscribedToTheNewsletter()
460
    {
461
        Assert::true($this->showPage->isSubscribedToNewsletter());
462
    }
463
464
    /**
465
     * @Then I should not see information about email verification
466
     */
467
    public function iShouldSeeInformationAboutEmailVerification()
468
    {
469
        Assert::true($this->showPage->hasEmailVerificationInformation());
470
    }
471
472
    /**
473
     * @When I make them subscribed to the newsletter
474
     */
475
    public function iMakeThemSubscribedToTheNewsletter()
476
    {
477
        $this->updatePage->subscribeToTheNewsletter();
478
    }
479
480
    /**
481
     * @When I change the password of user :customer to :newPassword
482
     */
483
    public function iChangeThePasswordOfUserTo(CustomerInterface $customer, $newPassword)
484
    {
485
        $this->updatePage->open(['id' => $customer->getId()]);
486
        $this->updatePage->changePassword($newPassword);
487
        $this->updatePage->saveChanges();
488
    }
489
490
    /**
491
     * @Then this customer should be subscribed to the newsletter
492
     */
493
    public function thisCustomerShouldBeSubscribedToTheNewsletter()
494
    {
495
        Assert::true($this->updatePage->isSubscribedToTheNewsletter());
496
    }
497
498
    /**
499
     * @Then the province in the default address should be :provinceName
500
     */
501
    public function theProvinceInTheDefaultAddressShouldBe($provinceName)
502
    {
503
        Assert::true($this->showPage->hasDefaultAddressProvinceName($provinceName));
504
    }
505
506
    /**
507
     * @Then this customer should have :groupName as their group
508
     */
509
    public function thisCustomerShouldHaveAsTheirGroup($groupName)
510
    {
511
        /** @var UpdatePageInterface|ShowPageInterface $currentPage */
512
        $currentPage = $this->currentPageResolver->getCurrentPageWithForm([$this->updatePage, $this->showPage]);
0 ignored issues
show
Documentation introduced by
array($this->updatePage, $this->showPage) is of type array<integer,object<Syl...\\ShowPageInterface>"}>, but the function expects a array<integer,object<Syl...\SymfonyPageInterface>>.

It seems like the type of the argument is not accepted by the function/method which you are calling.

In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.

We suggest to add an explicit type cast like in the following example:

function acceptsInteger($int) { }

$x = '123'; // string "123"

// Instead of
acceptsInteger($x);

// we recommend to use
acceptsInteger((integer) $x);
Loading history...
513
514
        Assert::same($currentPage->getGroupName(), $groupName);
515
    }
516
517
    /**
518
     * @Then I should see that this customer has verified the email
519
     */
520
    public function iShouldSeeThatThisCustomerHasVerifiedTheEmail()
521
    {
522
        Assert::true($this->showPage->hasVerifiedEmail());
523
    }
524
525
    /**
526
     * @Then I should see a single order in the list
527
     */
528
    public function iShouldSeeASingleOrderInTheList()
529
    {
530
        Assert::same($this->ordersIndexPage->countItems(), 1);
531
    }
532
533
    /**
534
     * @Then I should see the order with number :orderNumber in the list
535
     */
536
    public function iShouldSeeASingleOrderFromCustomer($orderNumber)
537
    {
538
        Assert::true($this->indexPage->isSingleResourceOnPage(['number' => $orderNumber]));
539
    }
540
541
    /**
542
     * @Then I should not see the order with number :orderNumber in the list
543
     */
544
    public function iShouldNotSeeASingleOrderFromCustomer($orderNumber)
545
    {
546
        Assert::false($this->indexPage->isSingleResourceOnPage(['number' => $orderNumber]));
547
    }
548
549
    /**
550
     * @When I do not specify any information
551
     */
552
    public function iDoNotSpecifyAnyInformation()
553
    {
554
        // Intentionally left blank.
555
    }
556
557
    /**
558
     * @Then I should not be able to specify their password
559
     */
560
    public function iShouldNotBeAbleToSpecifyItPassword()
561
    {
562
        Assert::true($this->createPage->isUserFormHidden());
563
    }
564
565
    /**
566
     * @Then I should still be on the customer creation page
567
     */
568
    public function iShouldBeOnTheCustomerCreationPage()
569
    {
570
        $this->createPage->verify();
571
    }
572
573
    /**
574
     * @Then I should be able to select create account option
575
     */
576
    public function iShouldBeAbleToSelectCreateAccountOption()
577
    {
578
        Assert::false($this->createPage->hasCheckedCreateOption());
579
    }
580
581
    /**
582
     * @Then I should be able to specify their password
583
     */
584
    public function iShouldBeAbleToSpecifyItPassword()
585
    {
586
        Assert::true($this->createPage->hasPasswordField());
587
    }
588
589
    /**
590
     * @Then I should not be able to select create account option
591
     */
592
    public function iShouldNotBeAbleToSelectCreateAccountOption()
593
    {
594
        Assert::true($this->createPage->hasCheckedCreateOption());
595
    }
596
597
    /**
598
     * @When I do not choose create account option
599
     */
600
    public function iDoNotChooseCreateAccountOption()
601
    {
602
        // Intentionally left blank.
603
    }
604
605
    /**
606
     * @Then I should not see create account option
607
     */
608
    public function iShouldNotSeeCreateAccountOption()
609
    {
610
        Assert::false($this->createPage->hasCreateOption());
0 ignored issues
show
Bug introduced by
The method hasCreateOption() does not exist on Sylius\Behat\Page\Admin\...mer\CreatePageInterface. Did you maybe mean create()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
611
    }
612
613
    /**
614
     * @Then /^I should be notified that the password must be at least (\d+) characters long$/
615
     */
616
    public function iShouldBeNotifiedThatThePasswordMustBeAtLeastCharactersLong($amountOfCharacters)
617
    {
618
        Assert::same(
619
            $this->createPage->getValidationMessage('password'),
620
            sprintf('Password must be at least %d characters long.', $amountOfCharacters)
621
        );
622
    }
623
624
    /**
625
     * @Then I should see the customer has not placed any orders yet
626
     */
627
    public function iShouldSeeTheCustomerHasNotYetPlacedAnyOrders()
628
    {
629
        Assert::false($this->showPage->hasCustomerPlacedAnyOrders());
630
    }
631
632
    /**
633
     * @Then /^I should see that they have placed (\d+) orders? in the "([^"]+)" channel$/
634
     */
635
    public function iShouldSeeThatTheyHavePlacedOrdersInTheChannel($ordersCount, $channelName)
636
    {
637
        Assert::same($this->showPage->getOrdersCountInChannel($channelName), (int) $ordersCount);
638
    }
639
640
    /**
641
     * @Then /^I should see that the overall total value of all their orders in the "([^"]+)" channel is "([^"]+)"$/
642
     */
643
    public function iShouldSeeThatTheOverallTotalValueOfAllTheirOrdersInTheChannelIs($channelName, $ordersValue)
644
    {
645
        Assert::same($this->showPage->getOrdersTotalInChannel($channelName), $ordersValue);
646
    }
647
648
    /**
649
     * @Then /^I should see that the average total value of their order in the "([^"]+)" channel is "([^"]+)"$/
650
     */
651
    public function iShouldSeeThatTheAverageTotalValueOfTheirOrderInTheChannelIs($channelName, $ordersValue)
652
    {
653
        Assert::same($this->showPage->getOrdersTotalInChannel($channelName), $ordersValue);
654
    }
655
}
656