Example #1
0
 /**
  * @return void
  */
 public function testIndexActionUpdateUser()
 {
     $customerData = $this->getFormData();
     $customerData[CustomerForm::FIELD_FIRST_NAME] = self::NEW_FIRST_NAME;
     $data = ['customer' => $customerData];
     $request = Request::create('/customer/edit?id-customer=' . $this->customer->getIdCustomer(), 'POST', $data);
     $application = (new Pimple())->getApplication();
     $application['request'] = $request;
     $result = $this->controller->indexAction($request);
     $this->customer->reload();
     $this->assertInstanceOf(RedirectResponse::class, $result);
     $this->assertSame(self::NEW_FIRST_NAME, $this->customer->getFirstName());
 }