-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more API documentation and standard formatting in Console, Exte…
…nsions and Matcher
- Loading branch information
1 parent
4e88a4b
commit b47342b
Showing
20 changed files
with
930 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,63 @@ | ||
<?php | ||
|
||
/** | ||
* PHPSpec | ||
* | ||
* LICENSE | ||
* | ||
* This file is subject to the GNU Lesser General Public License Version 3 | ||
* that is bundled with this package in the file LICENSE. | ||
* It is also available through the world-wide-web at this URL: | ||
* http://www.gnu.org/licenses/lgpl-3.0.txt | ||
* If you did not receive a copy of the license and are unable to | ||
* obtain it through the world-wide-web, please send an email | ||
* to license@phpspec.org so we can send you a copy immediately. | ||
* | ||
* @category PHPSpec | ||
* @package PHPSpec | ||
* @copyright Copyright (c) 2007-2009 Pádraic Brady, Travis Swicegood | ||
* @copyright Copyright (c) 2010-2011 Pádraic Brady, Travis Swicegood, | ||
* Marcello Duarte | ||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public Licence Version 3 | ||
*/ | ||
namespace PHPSpec\Extensions; | ||
|
||
/** | ||
* @category PHPSpec | ||
* @package PHPSpec | ||
* @copyright Copyright (c) 2007-2009 Pádraic Brady, Travis Swicegood | ||
* @copyright Copyright (c) 2010-2011 Pádraic Brady, Travis Swicegood, | ||
* Marcello Duarte | ||
* @license http://www.gnu.org/licenses/lgpl-3.0.txt GNU Lesser General Public Licence Version 3 | ||
*/ | ||
class Autotest | ||
{ | ||
/** | ||
* The autotest() static method serves as PHPSpec's Autotester. It will | ||
/** | ||
* @FIXME! Replace this with Autorun.php | ||
* | ||
* The autotest method serves as PHPSpec's Autotester. It will | ||
* run all tests continually, with 10 second delays between each | ||
* iterative run and report as normal for each iteration to the console | ||
* output. | ||
* | ||
* Use the CTRL+C key combination to trigger an exit from the console | ||
* running loop used for Autotesting. | ||
* | ||
* @param \PHPSpec\Console\Getopt $options | ||
* @param \PHPSpec\Console\Command $options | ||
*/ | ||
public function run(\PHPSpec\Console\Command $command) | ||
{ | ||
set_time_limit(0); | ||
public function run(\PHPSpec\Console\Command $command) | ||
{ | ||
set_time_limit(0); | ||
|
||
if (isset($command->options->a)) { | ||
$command->options->a = null; | ||
} | ||
if (isset($command->options->autotest)) { | ||
$command->options->autotest = null; | ||
if (isset($command->getOptions()->a)) { | ||
$command->getOptions()->a = null; | ||
} | ||
if (isset($command->getOptions()->autotest)) { | ||
$command->getOptions()->autotest = null; | ||
} | ||
|
||
while(true) { | ||
$command->run($options); | ||
sleep(10); | ||
} | ||
} | ||
while (true) { | ||
$command->run($command->getOptions()); | ||
sleep(10); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.