コード例 #1
0
    public function configure()
    {
        parent::configure();
        $this->name = 'generate-unit';
        $this->briefDescription = 'Generate a unit test case.';
        $this->detailedDescription = <<<END
Generates a skeleton unit test case for your project.
END;
        $this->addArguments(array(new sfCommandArgument('class', sfCommandArgument::REQUIRED, 'Name of the class to generate unit tests for.')));
        $this->addOptions(array(new sfCommandOption('no-tests', null, sfCommandOption::PARAMETER_NONE, 'If set, an empty test case will be generated (no skeleton tests).'), new sfCommandOption('include-inherited-methods', null, sfCommandOption::PARAMETER_NONE, 'If set, test skeletons will be generated for methods inherited from parent classes.')));
    }
    public function configure()
    {
        parent::configure();
        $this->name = 'generate-functional';
        $this->briefDescription = 'Generate a functional test case.';
        $this->detailedDescription = <<<END
Generates a skeleton functional test case for your project.
END;
        $this->addArguments(array(new sfCommandArgument('route', sfCommandArgument::REQUIRED, 'Route name or URL path to module/action (same syntax as gen_url()).', null)));
        $this->addOptions(array(new sfCommandOption('application', 'a', sfCommandArgument::OPTIONAL, 'Application name.', $this->_guessDefaultAppName())));
    }