1
0
Fork 0
mirror of synced 2024-08-04 04:52:03 +12:00
appwrite/tests/unit/GraphQL/BuilderTest.php

33 lines
776 B
PHP
Raw Normal View History

2021-03-17 09:05:48 +13:00
<?php
namespace Appwrite\Tests;
use Appwrite\Event\Event;
2022-07-13 21:34:56 +12:00
use Appwrite\GraphQL\SchemaBuilder;
use Appwrite\GraphQL\TypeRegistry;
2021-03-17 09:05:48 +13: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 21:34:56 +12:00
protected ?Response $response = null;
2021-03-17 09:05:48 +13:00
public function setUp(): void
{
$this->response = new Response(new SwooleResponse());
2022-07-13 21:34:56 +12:00
TypeRegistry::init($this->response->getModels());
2021-03-17 09:05:48 +13:00
}
2022-07-13 21:34:56 +12:00
/**
* @throws \Exception
*/
2022-07-12 09:52:00 +12:00
public function testCreateTypeMapping()
2021-03-17 09:05:48 +13:00
{
$model = $this->response->getModel(Response::MODEL_COLLECTION);
2022-09-30 19:59:20 +13:00
$typeMapping = TypeRegistry::fromModel($model->getType());
2021-03-17 09:05:48 +13:00
}
2022-07-12 09:52:00 +12:00
}