Ejemplo n.º 1
0
 /**
  * @param $username
  * @depends testCreateUser
  * @depends testEditRole
  */
 public function testViewAccountsContacts($username)
 {
     $login = new Login($this);
     $login->setUsername($username)->setPassword('123123q')->submit();
     /** @var Accounts $login */
     $login->openAccounts('OroCRM\\Bundle\\AccountBundle')->assertTitle('Accounts - Customers')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Account']");
     /** @var Contacts $login */
     $login->openContacts('OroCRM\\Bundle\\ContactBundle')->assertTitle('Contacts - Customers')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Contact']");
     /** @var ContactGroups $login */
     $login->openContactGroups('OroCRM\\Bundle\\ContactBundle')->assertTitle('Contact Groups - System')->assertElementNotPresent("//div[@class='container-fluid']//a[@title='Create Contact Group']");
     /** @var AclCheck $login */
     $login->openAclCheck('Oro\\Bundle\\SecurityBundle')->assertAcl('account/create')->assertAcl('contact/create')->assertAcl('contact/group/create')->assertAcl('contact/group/create');
 }
Ejemplo n.º 2
0
 /**
  * @param Login $login
  * @param $contactData
  */
 public function createContact(Login $login, $contactData)
 {
     /** @var Contacts $login */
     $login->openContacts('OroCRM\\Bundle\\ContactBundle')->add()->setFirstName($contactData['firstName'])->setLastName($contactData['secondName'])->setOwner('admin')->setEmail($contactData['email'])->save()->assertMessage('Contact saved');
 }