graphql-php/tests/Language/TokenTest.php

22 lines
439 B
PHP
Raw Normal View History

2017-10-04 18:06:25 +03:00
<?php
namespace GraphQL\Tests;
use GraphQL\Language\Token;
2018-07-29 18:43:10 +03:00
use PHPUnit\Framework\TestCase;
2017-10-04 18:06:25 +03:00
2018-07-29 18:43:10 +03:00
class TokenTest extends TestCase
2017-10-04 18:06:25 +03:00
{
public function testReturnTokenOnArray()
{
$token = new Token('Kind', 1, 10, 3, 5);
$expected = [
'kind' => 'Kind',
'value' => null,
'line' => 3,
'column' => 5
];
$this->assertEquals($expected, $token->toArray());
}
}