GraphQL\Tests\Utils\ValueFromAstTest::testConvertsAccordingToInputCoercionRules PHP Method

testConvertsAccordingToInputCoercionRules() public method

    public function testConvertsAccordingToInputCoercionRules()
    {
        $this->runTestCase(Type::boolean(), 'true', true);
        $this->runTestCase(Type::boolean(), 'false', false);
        $this->runTestCase(Type::int(), '123', 123);
        $this->runTestCase(Type::float(), '123', 123);
        $this->runTestCase(Type::float(), '123.456', 123.456);
        $this->runTestCase(Type::string(), '"abc123"', 'abc123');
        $this->runTestCase(Type::id(), '123456', '123456');
        $this->runTestCase(Type::id(), '"123456"', '123456');
    }