GraphQL\Tests\Type\SchemaValidatorTest::expectFails PHP Метод

expectFails() приватный Метод

private expectFails ( $schemaConfig, $error )
    private function expectFails($schemaConfig, $error)
    {
        try {
            $schema = new Schema($schemaConfig);
            $errors = SchemaValidator::validate($schema);
            if ($errors) {
                throw $errors[0];
            }
            $this->fail('Expected exception not thrown');
        } catch (\Exception $e) {
            $this->assertEquals($e->getMessage(), $error);
        }
    }
SchemaValidatorTest