GraphQL\Tests\Utils\ValueFromAstTest::testDoesNotConvertWhenInputCoercionRulesRejectAValue PHP Метод

testDoesNotConvertWhenInputCoercionRulesRejectAValue() публичный Метод

    public function testDoesNotConvertWhenInputCoercionRulesRejectAValue()
    {
        $undefined = Utils::undefined();
        $this->runTestCase(Type::boolean(), '123', $undefined);
        $this->runTestCase(Type::int(), '123.456', $undefined);
        $this->runTestCase(Type::int(), 'true', $undefined);
        $this->runTestCase(Type::int(), '"123"', $undefined);
        $this->runTestCase(Type::float(), '"123"', $undefined);
        $this->runTestCase(Type::string(), '123', $undefined);
        $this->runTestCase(Type::string(), 'true', $undefined);
        $this->runTestCase(Type::id(), '123.456', $undefined);
    }