File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed
Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change 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+ }
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments