Exemple #1
0
 /**
  * Form data has not been set on the block, but there is customer data from the customer session.
  * The customer data is something other than 'region_id' so that code path is skipped.
  */
 public function testGetFormDataNullFormDataCustomerFormData()
 {
     $data = new \Magento\Framework\Object();
     $data->setFirstname('John');
     $data->setCustomerData(1);
     $customerFormData = array('firstname' => 'John');
     $this->_customerSession->expects($this->once())->method('getCustomerFormData')->will($this->returnValue($customerFormData));
     $this->assertEquals($data, $this->_block->getFormData());
     $this->assertEquals($data, $this->_block->getData(self::FORM_DATA));
 }
        $zobrazim = $dostupne[1];
    }
}
$tempFile = "index.htm";
include "web/" . $zobrazim . ".php";
switch ($zobrazim) {
    case "login":
        $web = new Login();
        $tempFile = "login.htm";
        $data = $web->getData($glob_user);
        break;
    case "register":
        $web = new Register();
        $tempFile = "login.htm";
        $errors = call_register_user();
        $data = $web->getData($glob_user, $errors);
        break;
    case "index":
        $web = new Main();
        $data = $web->getData($glob_user);
        break;
    case "home":
        $web = new Home();
        $data = $web->getData($glob_user);
        break;
    case "profile":
        $web = new Profile();
        $profile_email = isset($_GET["email"]) ? $_GET["email"] : "unknown";
        $data = $web->getData($glob_user, $profile_email);
        break;
}