forked from etsy/411
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGroupTest.php
More file actions
18 lines (15 loc) · 717 Bytes
/
Copy pathGroupTest.php
File metadata and controls
18 lines (15 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
class GroupTest extends TestCase {
public function testGetDescription() {
TestHelper::populateDB([
[FOO\GroupTarget::$TABLE, 1, 0, 1, FOO\GroupTarget::T_EMAIL, 1, 'test@example.com', 0, 0, 0],
[FOO\GroupTarget::$TABLE, 2, 0, 1, FOO\GroupTarget::T_EMAIL, 1, 'best@example.com', 0, 0, 0],
]);
$group = new FOO\Group();
$group->setId(1);
$group['type'] = FOO\Group::T_ROT;
$this->assertSame(['test@example.com'], $group->getEmails(true, false));
$this->assertSame(['best@example.com'], $group->getEmails(true, false));
$this->assertSame(['test@example.com', 'best@example.com'], $group->getEmails(true, true));
}
}