Skip to content

Commit 8a0f44f

Browse files
Added missing unit tests
1 parent cd7279c commit 8a0f44f

File tree

2 files changed

+48
-1
lines changed

2 files changed

+48
-1
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
namespace phpbu\App\Backup\Source;
3+
4+
/**
5+
* Status Test
6+
*
7+
* @package phpbu
8+
* @subpackage tests
9+
* @author Sebastian Feldmann <sebastian@phpbu.de>
10+
* @copyright Sebastian Feldmann <sebastian@phpbu.de>
11+
* @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License
12+
* @link http://www.phpbu.de/
13+
* @since Class available since Release 2.0.1
14+
*/
15+
class StatusTest extends \PHPUnit_Framework_TestCase
16+
{
17+
/**
18+
* Tests Status::create
19+
*/
20+
public function testDefaults()
21+
{
22+
$status = Status::create();
23+
24+
$this->assertTrue($status->handledCompression());
25+
}
26+
27+
/**
28+
* Tests Status::getDataPath
29+
*
30+
* @expectedException \phpbu\App\Exception
31+
*/
32+
public function testNoPathForAlreadyCompressedSources()
33+
{
34+
$status = Status::create();
35+
$status->getDataPath();
36+
}
37+
38+
/**
39+
* Tests Status::getDataPath
40+
*/
41+
public function testUncompressedDataPath()
42+
{
43+
$status = Status::create()->uncompressed()->dataPath('/foo');
44+
45+
$this->assertFalse($status->handledCompression());
46+
$this->assertEquals('/foo', $status->getDataPath());
47+
}
48+
}

tests/phpbu/Log/MailTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ public function testGetSubscribedEvents()
2121
{
2222
$events = Mail::getSubscribedEvents();
2323

24-
$this->assertTrue(array_key_exists('phpbu.debug', $events));
2524
$this->assertTrue(array_key_exists('phpbu.backup_start', $events));
2625
$this->assertTrue(array_key_exists('phpbu.check_start', $events));
2726

0 commit comments

Comments
 (0)