From 37fa89954029011eec704c7a8546f494dd71fc8b Mon Sep 17 00:00:00 2001 From: Johann Hoffmann Date: Wed, 30 Apr 2025 17:32:23 +0200 Subject: [PATCH] phpunit test cases runnable; WIP teaching phpunit what a codeigniter3 is --- index.phpunit.php | 39 +++++++++++++++ phpunit.xml | 6 +-- .../api/BookmarkTest/BookmarkTest.php | 48 +++++++++++++++++++ 3 files changed, 90 insertions(+), 3 deletions(-) create mode 100644 index.phpunit.php create mode 100644 system/UnitTests/api/BookmarkTest/BookmarkTest.php diff --git a/index.phpunit.php b/index.phpunit.php new file mode 100644 index 000000000..449e2a0ab --- /dev/null +++ b/index.phpunit.php @@ -0,0 +1,39 @@ + - + - - system/UnitTests/vertragsbestandteil/gui + + system/UnitTests/api/ diff --git a/system/UnitTests/api/BookmarkTest/BookmarkTest.php b/system/UnitTests/api/BookmarkTest/BookmarkTest.php new file mode 100644 index 000000000..1b96033d6 --- /dev/null +++ b/system/UnitTests/api/BookmarkTest/BookmarkTest.php @@ -0,0 +1,48 @@ +_ci = &get_instance(); +// +// if (!is_object($this->_ci)) { +// throw new \Exception('CI instance is not available'); +// } +// +// $this->_ci->load->library('AuthLib', null, 'AuthLib'); +// +// $this->_ci->AuthLib->loginLDAP('horauer', 'FHCompleteDemo42!'); +// $this->_ci->load->controller('api/v1/Bookmark'); +// +// $this->obj = new Bookmark(); +// } + + /** @test */ + public function test_true() + { + echo 'in the test_true case'; + $this->assertTrue(true); + } + + +} \ No newline at end of file