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

testCoercesListsOfNonNullValues() public method

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