From 7a401f5cf26cc2782bb0d49dbcae9a6db3465c9e Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Mon, 3 Sep 2012 16:01:24 -0700 Subject: [PATCH] Added testing suite for Data --- lib/test/data_test.php | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/test/data_test.php 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'); + } +} -- 2.34.1