Skip to content

Commit

Permalink
[stagehandtestrunner] upgraded Stagehand_TestRunner to 4.0.0 by Compo…
Browse files Browse the repository at this point in the history
…ser (Issue #54, #55, #56)
  • Loading branch information
iteman committed Jun 7, 2014
1 parent 154a41b commit fee5580
Show file tree
Hide file tree
Showing 867 changed files with 41 additions and 81,283 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/vendor/
/composer.lock
Binary file not shown.

This file was deleted.

This file was deleted.

40 changes: 28 additions & 12 deletions com.piece_framework.makegood.stagehandtestrunner/resources/php/bin/testrunner.php
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#!/usr/bin/php
#!/usr/bin/env php
<?php
/* vim: set expandtab tabstop=4 shiftwidth=4: */

/**
* PHP version 5.3
*
* Copyright (c) 2011-2012 KUBO Atsuhiro <kubo@iteman.jp>,
* Copyright (c) 2011-2012, 2014 KUBO Atsuhiro <kubo@iteman.jp>,
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
Expand All @@ -30,28 +30,24 @@
* POSSIBILITY OF SUCH DAMAGE.
*
* @package Stagehand_TestRunner
* @copyright 2011-2012 KUBO Atsuhiro <kubo@iteman.jp>
* @copyright 2011-2012, 2014 KUBO Atsuhiro <kubo@iteman.jp>
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @version Release: 3.6.1
* @version Release: @package_version@
* @since File available since Release 3.0.0
*/

namespace Stagehand\TestRunner\Core;

initializeEnvironment();

try {
$GLOBALS['STAGEHAND_TESTRUNNER_workingDirectoryAtStartup'] = workingDirectoryAtStartup();
$GLOBALS['STAGEHAND_TESTRUNNER_preloadScript'] = preloadScript();
loadAutoloader();
initializeEnvironment();
workingDirectoryAtStartup();
preloadScript();
} catch (\Exception $e) {
echo $e->getMessage() . PHP_EOL;
exit(1);
}

if (!class_exists('Stagehand\TestRunner\Core\Bootstrap')) {
require_once 'Stagehand/TestRunner/Core/Bootstrap.php';
}

$bootstrap = new \Stagehand\TestRunner\Core\Bootstrap();
$bootstrap->boot();

Expand All @@ -60,6 +56,26 @@

exit($result);

/**
* @since Method available since Release 4.0.0
* @throws \RuntimeException
*/
function loadAutoloader()
{
$autoloadFileForProject = dirname(dirname(dirname(__DIR__))) . '/autoload.php';
$autoloadFileForStagehandTestRunner = dirname(__DIR__) . '/vendor/autoload.php';

foreach (array($autoloadFileForProject, $autoloadFileForStagehandTestRunner) as $autoloadFile) {
if (file_exists($autoloadFile)) {
require $autoloadFile;

return;
}
}

throw new \RuntimeException(sprintf('The autoload file "%s" is not found. Check your Composer environment.', $autoloadFileForProject));
}

/**
* @since Method available since Release 3.4.0
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"require": {
"php": ">=5.3.3",
"piece/stagehand-testrunner": "4.0.0"
},
"scripts": {
"post-autoload-dump": [
"Stagehand\\TestRunner\\Composer\\Script::compile"
]
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit fee5580

Please sign in to comment.