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

testCoercesNonNullListsOfNonNullValues() public method

    public function testCoercesNonNullListsOfNonNullValues()
    {
        $nonNullListOfNonNullBool = Type::nonNull(Type::listOf(Type::nonNull(Type::boolean())));
        $undefined = Utils::undefined();
        $this->runTestCase($nonNullListOfNonNullBool, 'true', [true]);
        $this->runTestCase($nonNullListOfNonNullBool, '123', $undefined);
        $this->runTestCase($nonNullListOfNonNullBool, 'null', $undefined);
        $this->runTestCase($nonNullListOfNonNullBool, '[true, false]', [true, false]);
        $this->runTestCase($nonNullListOfNonNullBool, '[true, 123]', $undefined);
        $this->runTestCase($nonNullListOfNonNullBool, '[true, null]', $undefined);
    }