Youshido\GraphQL\Type\Object\ObjectType::getName PHP 메소드

getName() 공개 메소드

public getName ( )
    public function getName()
    {
        return $this->getConfigValue('name');
    }

Usage Example

예제 #1
0
 public function testNormalCreatingParam()
 {
     $objectType = new ObjectType(['name' => 'Post', 'fields' => ['id' => new IntType()], 'description' => 'Post type description']);
     $this->assertEquals($objectType->getKind(), TypeMap::KIND_OBJECT);
     $this->assertEquals($objectType->getName(), 'Post');
     $this->assertEquals($objectType->getType(), $objectType);
     $this->assertEquals($objectType->getType()->getName(), 'Post');
     $this->assertEquals($objectType->getNamedType(), $objectType);
     $this->assertEmpty($objectType->getInterfaces());
     $this->assertTrue($objectType->isValidValue($objectType));
     $this->assertTrue($objectType->isValidValue(null));
     $this->assertEquals('Post type description', $objectType->getDescription());
 }