0
0
Fork 0
mirror of https://github.com/salesagility/SuiteCRM.git synced 2025-02-06 23:10:03 +00:00
salesagility_SuiteCRM/tests/_support/Step/Acceptance/Accounts.php
Connor Shea 1e40dd5683 Replace createAccount() in acceptance tests.
It now uses a database call instead of inputting values via a form.

This is based on how it's done in the API tests.
2019-07-11 10:49:46 -06:00

30 lines
597 B
PHP

<?php
namespace Step\Acceptance;
class Accounts extends \AcceptanceTester
{
/**
* Create an account
*
* @param string $name
* @return string Account ID
*/
public function createAccount($name)
{
global $db;
$id = create_guid();
$accountType = 'Customer';
$query = "INSERT INTO accounts (id, name, account_type, date_entered) VALUES ('?', '?', '?', '?')";
$db->pQuery($query, array(
$id,
$name,
$accountType,
date('Y-m-d H:i:s')
));
return $id;
}
}