forked from etsy/411
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNotificationTest.php
More file actions
33 lines (26 loc) · 890 Bytes
/
Copy pathNotificationTest.php
File metadata and controls
33 lines (26 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
class NotificationTest extends TestCase {
public function setUp() {
parent::setUp();
$this->setSite();
}
public function tearDown() {
$this->clearSite();
parent::tearDown();
}
public function setSite() {
$site = $this->getMockObject('FOO\Site', ['id' => 0, 'name' => 'Test411', 'host' => 'test.com']);
FOO\SiteFinder::setSite($site);
}
public function clearSite() {
FOO\SiteFinder::clearSite();
}
public function testGetFrom() {
TestHelper::populateDB([
[FOO\DBConfig::$TABLE, 0, 'from_email', 'test@test.com'],
[FOO\DBConfig::$TABLE, 0, 'from_error_email', 'error@test.com'],
]);
$this->assertSame('test@test.com', FOO\Notification::getFrom(false));
$this->assertSame('error@test.com', FOO\Notification::getFrom(true));
}
}