mirror of
https://github.com/sctn4elk/CustomerRewardsRESTAPI.git
synced 2025-01-09 15:24:30 -06:00
77 lines
1.9 KiB
PHP
77 lines
1.9 KiB
PHP
<?php declare(strict_types=1);
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
define('PD', 'D:\DEV\Git Repository\CustomerRewardsRESTAPI');
|
|
require_once PD . "/Controller/API/BaseController.php";
|
|
|
|
/**
|
|
* Description of BaseControllerTest
|
|
*
|
|
* @author SCTN4
|
|
*/
|
|
class BaseControllerTest extends TestCase {
|
|
|
|
protected $base;
|
|
|
|
#[\Override]
|
|
public function setUp(): void {
|
|
$this->base = new BaseController();
|
|
}
|
|
|
|
#[\Override]
|
|
public function tearDown(): void {
|
|
$this->base = null;
|
|
}
|
|
|
|
public function testConstruct(): void
|
|
{
|
|
$this->assertSame('BaseController', $this->base->basename);
|
|
}
|
|
|
|
public function testCreate(): void
|
|
{
|
|
$controllerObj = BaseController::create();
|
|
$this->assertSame('BaseController', $controllerObj->basename);
|
|
}
|
|
|
|
#[Depends('testConstruct')]
|
|
public function testCall(): void
|
|
{
|
|
$this->base->mymethod = 'test';
|
|
$this->assertSame('test', $this->base->mymethod);
|
|
}
|
|
|
|
public function testGetUriSegments(): void
|
|
{
|
|
// Stop here and mark this test as incomplete.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.',
|
|
);
|
|
}
|
|
|
|
public function testGetQueryStringParams(): void
|
|
{
|
|
// Stop here and mark this test as incomplete.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.',
|
|
);
|
|
}
|
|
|
|
public function testGetServerRequestMethod(): void
|
|
{
|
|
// Stop here and mark this test as incomplete.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.',
|
|
);
|
|
}
|
|
|
|
public function testSendOutput(): void
|
|
{
|
|
// Stop here and mark this test as incomplete.
|
|
$this->markTestIncomplete(
|
|
'This test has not been implemented yet.',
|
|
);
|
|
}
|
|
|
|
}
|