From d59b1c8812f62848acc2bf19f020abf4949e75ef Mon Sep 17 00:00:00 2001 From: msquare Date: Sun, 9 Oct 2016 09:40:11 +0200 Subject: fix phpunit config --- phpunit.xml | 24 ++++++++++++++++++++++++ test/model/LogEntriesModelTest.php | 32 ++++++++++++++++++++++++++++++++ test/model/LogEntries_model_test.php | 32 -------------------------------- test/model/RoomModelTest.php | 33 +++++++++++++++++++++++++++++++++ test/model/Room_model_test.php | 33 --------------------------------- test/phpunit.xml | 14 -------------- 6 files changed, 89 insertions(+), 79 deletions(-) create mode 100644 phpunit.xml create mode 100644 test/model/LogEntriesModelTest.php delete mode 100644 test/model/LogEntries_model_test.php create mode 100644 test/model/RoomModelTest.php delete mode 100644 test/model/Room_model_test.php delete mode 100644 test/phpunit.xml diff --git a/phpunit.xml b/phpunit.xml new file mode 100644 index 00000000..5b6d97a1 --- /dev/null +++ b/phpunit.xml @@ -0,0 +1,24 @@ + + + + ./test/model/ + + + + + ./include/ + ./public/ + + + + + + diff --git a/test/model/LogEntriesModelTest.php b/test/model/LogEntriesModelTest.php new file mode 100644 index 00000000..b4cef725 --- /dev/null +++ b/test/model/LogEntriesModelTest.php @@ -0,0 +1,32 @@ +assertNotFalse(LogEntry_create('test', 'test_LogEntry_create')); + + // There should be one more log entry now + $this->assertEquals(count(LogEntries()), $count + 1); + } + + public function test_LogEntries_clear_all() { + $this->create_LogEntry(); + $this->assertTrue(count(LogEntries()) > 0); + $this->assertNotFalse(LogEntries_clear_all()); + $this->assertEquals(count(LogEntries()), 0); + } + + /** + * @after + */ + public function teardown() { + LogEntries_clear_all(); + } +} + +?> diff --git a/test/model/LogEntries_model_test.php b/test/model/LogEntries_model_test.php deleted file mode 100644 index cefc4177..00000000 --- a/test/model/LogEntries_model_test.php +++ /dev/null @@ -1,32 +0,0 @@ -assertNotFalse(LogEntry_create('test', 'test_LogEntry_create')); - - // There should be one more log entry now - $this->assertEquals(count(LogEntries()), $count + 1); - } - - public function test_LogEntries_clear_all() { - $this->create_LogEntry(); - $this->assertTrue(count(LogEntries()) > 0); - $this->assertNotFalse(LogEntries_clear_all()); - $this->assertEquals(count(LogEntries()), 0); - } - - /** - * @after - */ - public function teardown() { - LogEntries_clear_all(); - } -} - -?> \ No newline at end of file diff --git a/test/model/RoomModelTest.php b/test/model/RoomModelTest.php new file mode 100644 index 00000000..33e6ca37 --- /dev/null +++ b/test/model/RoomModelTest.php @@ -0,0 +1,33 @@ +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); + } + } +} + +?> diff --git a/test/model/Room_model_test.php b/test/model/Room_model_test.php deleted file mode 100644 index a36a9d9f..00000000 --- a/test/model/Room_model_test.php +++ /dev/null @@ -1,33 +0,0 @@ -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 deleted file mode 100644 index d6007646..00000000 --- a/test/phpunit.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - model/* - - - - - - -- cgit v1.2.3-54-g00ecf