From f5f93fb10e3c28d838fe80b15c1095b78bfb0b27 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 14 May 2008 07:18:12 +0000 Subject: [PATCH] Added basic test to MultiForm --- tests/MultiFormSessionTest.php | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tests/MultiFormSessionTest.php diff --git a/tests/MultiFormSessionTest.php b/tests/MultiFormSessionTest.php new file mode 100644 index 0000000..6360037 --- /dev/null +++ b/tests/MultiFormSessionTest.php @@ -0,0 +1,33 @@ +write(); + + $this->assertTrue($session->ID != 0); + $this->assertTrue($session->ID > 0); + + $session->delete(); + } + + /** + * Test that a MemberID was set on MultiFormSession if + * a member is logged in. + */ + function testMemberLogging() { + $session = new MultiFormSession(); + $session->write(); + + if($memberID = Member::currentUserID()) { + $this->assertTrue($memberID == $session->SubmitterID); + } + } + +} + +?> \ No newline at end of file