mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 16:32:20 +00:00
using phpunit to test controllers which are running in codeigniter3 requires further request/response mocking; setup of swagger-ui and swagger openapi doc generation for bookmark.php; WIP integration tests with ci3 & phpunit, maybe annotation generation solution for swagger annotations
This commit is contained in:
committed by
Johann Hoffmann
parent
37fa899540
commit
664796c69f
@@ -1,48 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace BookmarkTest;
|
||||
echo "BookmarkTest loaded\n";
|
||||
|
||||
|
||||
echo "Resolved path: " . APPPATH.'controllers/api/frontend/v1/Bookmark.php' . "\n";
|
||||
|
||||
|
||||
//require_once(APPPATH.'controllers/api/frontend/v1/Bookmark.php');
|
||||
//require_once(APPPATH.'libraries/AuthLib.php');
|
||||
|
||||
use Bookmark;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class BookmarkTest extends TestCase
|
||||
{
|
||||
private $_ci;
|
||||
|
||||
// public function setUp(): void
|
||||
//
|
||||
//echo "BookmarkTest loaded\n";
|
||||
//require_once __DIR__ . '/../../CI_TestCase.php';
|
||||
//
|
||||
//class BookmarkTest extends CI_TestCase
|
||||
//{
|
||||
//
|
||||
// public function setUp()
|
||||
// {
|
||||
// error_reporting(E_ALL & ~E_STRICT & ~E_DEPRECATED);
|
||||
// parent::setUp();
|
||||
//
|
||||
// echo 'in the setUp';
|
||||
// // Load CodeIgniter instance
|
||||
// $this->_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();
|
||||
//// require_once APPPATH . 'core/FHC_Controller.php';
|
||||
//// require_once APPPATH . 'core/Auth_Controller.php';
|
||||
//// require_once APPPATH . 'core/FHCAPI_Controller.php';
|
||||
// require_once APPPATH . 'controllers/api/frontend/v1/Bookmark.php';
|
||||
// $this->bookmark = new Bookmark(); // or $this->CI->bookmark
|
||||
// }
|
||||
|
||||
/** @test */
|
||||
public function test_true()
|
||||
{
|
||||
echo 'in the test_true case';
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
//
|
||||
// /** @test */
|
||||
// public function test_true()
|
||||
// {
|
||||
// echo "expected response";
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
//}
|
||||
Reference in New Issue
Block a user