@@ -108,7 +108,7 @@ public function testSaveActionWithInvalidFormData()
108
108
*/
109
109
$ this ->assertEquals (
110
110
$ post ,
111
- $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->getCustomerData ()
111
+ $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->getCustomerFormData ()
112
112
);
113
113
$ this ->assertRedirect ($ this ->stringStartsWith ($ this ->_baseControllerUrl . 'new ' ));
114
114
}
@@ -144,7 +144,7 @@ public function testSaveActionWithInvalidCustomerAddressData()
144
144
*/
145
145
$ this ->assertEquals (
146
146
$ post ,
147
- $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->getCustomerData ()
147
+ $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->getCustomerFormData ()
148
148
);
149
149
$ this ->assertRedirect ($ this ->stringStartsWith ($ this ->_baseControllerUrl . 'new ' ));
150
150
}
@@ -183,7 +183,7 @@ public function testSaveActionWithValidCustomerDataAndValidAddressData()
183
183
$ this ->getRequest ()->setParam ('back ' , '1 ' );
184
184
185
185
// Emulate setting customer data to session in editAction
186
- $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->setCustomerData ($ post );
186
+ $ this ->objectManager ->get ('Magento\Backend\Model\Session ' )->setCustomerFormData ($ post );
187
187
188
188
$ this ->dispatch ('backend/customer/index/save ' );
189
189
/**
@@ -480,7 +480,7 @@ public function testSaveActionCoreException()
480
480
);
481
481
$ this ->assertEquals (
482
482
$ post ,
483
- Bootstrap::getObjectManager ()->get ('Magento\Backend\Model\Session ' )->getCustomerData ()
483
+ Bootstrap::getObjectManager ()->get ('Magento\Backend\Model\Session ' )->getCustomerFormData ()
484
484
);
485
485
$ this ->assertRedirect ($ this ->stringStartsWith ($ this ->_baseControllerUrl . 'new/key/ ' ));
486
486
}
@@ -489,68 +489,6 @@ public function testSaveActionCoreException()
489
489
* @magentoDataFixture Magento/Customer/_files/customer_sample.php
490
490
*/
491
491
public function testEditAction ()
492
- {
493
- $ customerData = [
494
- 'customer_id ' => '1 ' ,
495
- 'account ' => [
496
- 'middlename ' => 'new middlename ' ,
497
- 'group_id ' => 1 ,
498
- 'website_id ' => 1 ,
499
- 'firstname ' => 'new firstname ' ,
500
- 'lastname ' => 'new lastname ' ,
501
- 'email ' => 'customer@example.com ' ,
502
- 'default_shipping ' => '_item1 ' ,
503
- 'new_password ' => 'auto ' ,
504
- 'sendemail_store_id ' => '1 ' ,
505
- 'sendemail ' => '1 ' ,
506
- 'created_at ' => '2000-01-01 00:00:00 ' ,
507
- 'customer_address ' => [
508
- '1 ' => [
509
- 'firstname ' => 'update firstname ' ,
510
- 'lastname ' => 'update lastname ' ,
511
- 'street ' => ['update street ' ],
512
- 'city ' => 'update city ' ,
513
- 'country_id ' => 'US ' ,
514
- 'postcode ' => '01001 ' ,
515
- 'telephone ' => '+7000000001 ' ,
516
- ],
517
- '_item1 ' => [
518
- 'firstname ' => 'default firstname ' ,
519
- 'lastname ' => 'default lastname ' ,
520
- 'street ' => ['default street ' ],
521
- 'city ' => 'default city ' ,
522
- 'country_id ' => 'US ' ,
523
- 'postcode ' => '01001 ' ,
524
- 'telephone ' => '+7000000001 ' ,
525
- ],
526
- '_template_ ' => [
527
- 'firstname ' => '' ,
528
- 'lastname ' => '' ,
529
- 'street ' => [],
530
- 'city ' => '' ,
531
- 'country_id ' => 'US ' ,
532
- 'postcode ' => '' ,
533
- 'telephone ' => '' ,
534
- ],
535
- ],
536
- ],
537
- ];
538
- /**
539
- * set customer data
540
- */
541
- Bootstrap::getObjectManager ()->get ('Magento\Backend\Model\Session ' )->setCustomerData ($ customerData );
542
- $ this ->getRequest ()->setParam ('id ' , 1 );
543
- $ this ->dispatch ('backend/customer/index/edit ' );
544
- $ body = $ this ->getResponse ()->getBody ();
545
-
546
- // verify
547
- $ this ->assertContains ('<h1 class="page-title">new firstname new lastname</h1> ' , $ body );
548
- }
549
-
550
- /**
551
- * @magentoDataFixture Magento/Customer/_files/customer_sample.php
552
- */
553
- public function testEditActionNoSessionData ()
554
492
{
555
493
$ this ->getRequest ()->setParam ('id ' , 1 );
556
494
$ this ->dispatch ('backend/customer/index/edit ' );
0 commit comments