mirror of
https://github.com/Karaka-Management/oms-Search.git
synced 2026-01-11 18:48:41 +00:00
improve testing
This commit is contained in:
parent
ac977bd3cc
commit
2f5262f8aa
|
|
@ -98,6 +98,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
*/
|
*/
|
||||||
public function testApiSearch() : void
|
public function testApiSearch() : void
|
||||||
{
|
{
|
||||||
|
$searchRoutes = include __DIR__ . '/../../Admin/SearchCommands.php';
|
||||||
|
self::assertGreaterThan(0, \count($searchRoutes));
|
||||||
|
|
||||||
$response = new HttpResponse();
|
$response = new HttpResponse();
|
||||||
$request = new HttpRequest(new HttpUri(''));
|
$request = new HttpRequest(new HttpUri(''));
|
||||||
|
|
||||||
|
|
@ -105,6 +108,6 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
||||||
$request->setData('search', ':help introduction');
|
$request->setData('search', ':help introduction');
|
||||||
|
|
||||||
$this->module->routeSearch($request, $response);
|
$this->module->routeSearch($request, $response);
|
||||||
self::assertGreaterThan(0, \count($response->get('')));
|
self::assertGreaterThan(0, \count($response->get($request->uri->__toString())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user