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 ++++++++++++++++++++++++++++++++ test/phpunit.xml | 11 +++++++++++ 2 files changed, 43 insertions(+) create mode 100644 test/model/Room_model_test.php create mode 100644 test/phpunit.xml (limited to 'test') 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 diff --git a/test/phpunit.xml b/test/phpunit.xml new file mode 100644 index 00000000..a2c020ff --- /dev/null +++ b/test/phpunit.xml @@ -0,0 +1,11 @@ + + + + model + + + -- cgit v1.2.3-70-g09d2