PhpSpec\Process\Prerequisites\SuitePrerequisites::guardPrerequisites PHP Method

guardPrerequisites() public method

public guardPrerequisites ( )
    public function guardPrerequisites()
    {
        $undefinedTypes = array();
        foreach ($this->executionContext->getGeneratedTypes() as $type) {
            if (!class_exists($type) && !interface_exists($type)) {
                $undefinedTypes[] = $type;
            }
        }
        if ($undefinedTypes) {
            throw new PrerequisiteFailedException(sprintf("The type%s %s %s generated but could not be loaded. Do you need to configure an autoloader?\n", count($undefinedTypes) > 1 ? 's' : '', join(', ', $undefinedTypes), count($undefinedTypes) > 1 ? 'were' : 'was'));
        }
    }