graphql-php/tests/Language/TokenTest.php

25 lines
482 B
PHP
Raw Normal View History

2017-10-04 18:06:25 +03:00
<?php
2018-09-01 21:21:08 +03:00
declare(strict_types=1);
2017-10-04 18:06:25 +03:00
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() : void
2017-10-04 18:06:25 +03:00
{
2018-09-01 21:21:08 +03:00
$token = new Token('Kind', 1, 10, 3, 5);
2017-10-04 18:06:25 +03:00
$expected = [
2018-09-01 21:21:08 +03:00
'kind' => 'Kind',
'value' => null,
'line' => 3,
'column' => 5,
2017-10-04 18:06:25 +03:00
];
$this->assertEquals($expected, $token->toArray());
}
}