From 0a59089e2b3e16923b80cf071c769d628053e59e Mon Sep 17 00:00:00 2001 From: Philip Häusler Date: Thu, 14 May 2015 17:20:46 +0200 Subject: add room model tests --- test/model/Room_model_test.php | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 test/model/Room_model_test.php (limited to 'test/model/Room_model_test.php') diff --git a/test/model/Room_model_test.php b/test/model/Room_model_test.php new file mode 100644 index 00000000..d95c5787 --- /dev/null +++ b/test/model/Room_model_test.php @@ -0,0 +1,32 @@ +room_id = Room_create('test', false, true, ''); + } + + public function test_Room() { + $this->create_Room(); + + $room = Room($this->room_id); + + $this->assertNotFalse($room); + $this->assertNotNull($room); + $this->assertEquals($room['Name'], 'test'); + + $this->assertNull(Room(- 1)); + } + + /** + * @after + */ + public function teardown() { + if ($this->room_id != null) + Room_delete($this->room_id); + } +} + +?> \ No newline at end of file -- cgit v1.2.3-54-g00ecf