locationToArray() public static method

public static locationToArray ( Location $loc ) : array
$loc GraphQL\Language\AST\Location
return array
コード例 #1
0
ファイル: ParserTest.php プロジェクト: webonyx/graphql-php
 /**
  * @it contains location information that only stringifys start/end
  */
 public function testConvertToArray()
 {
     $source = new Source('{ id }');
     $result = Parser::parse($source);
     $this->assertEquals(['start' => 0, 'end' => '6'], TestUtils::locationToArray($result->loc));
 }