appwrite/tests/unit/GraphQL/BuilderTest.php

33 lines
770 B
PHP
Raw Normal View History

2021-03-16 20:05:48 +00:00
<?php
namespace Appwrite\Tests;
use Appwrite\Event\Event;
2022-07-13 09:34:56 +00:00
use Appwrite\GraphQL\SchemaBuilder;
use Appwrite\GraphQL\TypeRegistry;
2021-03-16 20:05:48 +00:00
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
use PHPUnit\Framework\TestCase;
use Swoole\Http\Response as SwooleResponse;
use Utopia\App;
class BuilderTest extends TestCase
{
2022-07-13 09:34:56 +00:00
protected ?Response $response = null;
2021-03-16 20:05:48 +00:00
public function setUp(): void
{
$this->response = new Response(new SwooleResponse());
2022-07-13 09:34:56 +00:00
TypeRegistry::init($this->response->getModels());
2021-03-16 20:05:48 +00:00
}
2022-07-13 09:34:56 +00:00
/**
* @throws \Exception
*/
2022-07-11 21:52:00 +00:00
public function testCreateTypeMapping()
2021-03-16 20:05:48 +00:00
{
$model = $this->response->getModel(Response::MODEL_COLLECTION);
2022-07-13 09:34:56 +00:00
$typeMapping = TypeRegistry::get($model->getType());
2021-03-16 20:05:48 +00:00
}
2022-07-11 21:52:00 +00:00
}