From: Gabriel Dunne Date: Mon, 3 Sep 2012 23:01:24 +0000 (-0700) Subject: Added testing suite for Data X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=7a401f5cf26cc2782bb0d49dbcae9a6db3465c9e;p=plog.git Added testing suite for Data --- diff --git a/lib/test/data_test.php b/lib/test/data_test.php new file mode 100644 index 0000000..5053ee6 --- /dev/null +++ b/lib/test/data_test.php @@ -0,0 +1,28 @@ +assertTrue(is_array($entries)); + } + + function test_EntryFolderNotExist() { + $this->expectException( new Exception("Directory does not exist") ); + get_entries('sdfs'); + } + + function test_GettingPagesArray() { + $entries = get_pages(); + $this->assertTrue(is_array($entries)); + } + + function test_GettingDirsArray() { + $dirs = get_dirs(); + $this->assertTrue(is_array($dirs)); + } + + function test_getEntryIsFileObj() { + $this->assertIsA(get_entry('/projects/prism'), 'stdClass'); + } +}