public function MandrillTestCase::testGetSubaccounts in Mandrill 7.2
Tests getting a list of subaccounts.
File
- tests/
mandrill.test, line 124 - Test class and methods for the Mandrill module.
Class
- MandrillTestCase
- @file Test class and methods for the Mandrill module.
Code
public function testGetSubaccounts() {
$subaccounts = mandrill_get_subaccounts();
$this
->assertTrue(!empty($subaccounts), 'Tested retrieving subaccounts.');
if (!empty($subaccounts) && is_array($subaccounts)) {
foreach ($subaccounts as $subaccount) {
$this
->assertTrue(!empty($subaccount['name']), 'Tested valid subaccount: ' . $subaccount['name']);
}
}
}