/** * @test */ public function testBusinessAccount() { $businessAccount = new CreateAccount(); $response = $businessAccount->createBusinessAccount(); $this->assertEquals("Success", $response->responseEnvelope->ack); $this->assertNotNull($response->createAccountKey); }
public function init() { parent::init(); $account = new AccountsModule($this->id); $account = $account->fetchAsArray(); $this->setAction("/account/edit/account_id/{$this->id}"); $this->populate($account); }
</head> <body class="ui-content"> <div class="ui-content ui-body-m"> <img src='trailapp.png' alt='trail app'><small>by Vincent Nacar</small> </div> <center> <div> <?php if (isset($_POST["submit-index"])) { header("Location:Index.php"); } if (isset($_POST["submit-registration"])) { require_once "Controller/DbConnection.php"; require_once "Controller/CreateAccount.php"; $db = new DbConnection_Controller(); $newAcct = new CreateAccount($_POST["email"]); if ($db->StartDbConnection()) { if (!$newAcct->CheckEmailIfExists($db->GetCon())) { $newAcct->GetUserData($_POST["fullname"], $_POST["sex"], $_POST["bday"], $_POST["pass"]); if ($newAcct->SaveNewAccount($db->GetCon())) { echo "success"; } } else { echo "Email is currently used by another user."; } } } ?> <h3>Create an Account</h3><hr> <form action="CreateAccount.php" method="POST"> <table>