forked from zendframework/modules.zendframework.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request zendframework#47 from Hounddog/feature/testing
Feature/testing
- Loading branch information
Showing
13 changed files
with
178 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
language: php | ||
php: | ||
- "5.3" | ||
|
||
before_script: | ||
- git submodule update --init --recursive | ||
|
||
script: | ||
- phpunit | ||
|
||
notifications: | ||
irc: "irc.freenode.org#zftalk.dev.modules" |
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
namespace EdpGithubTest; | ||
|
||
use Zend\Loader\AutoloaderFactory; | ||
use Zend\Mvc\Service\ServiceManagerConfig; | ||
use Zend\ServiceManager\ServiceManager; | ||
use Zend\Stdlib\ArrayUtils; | ||
use RuntimeException; | ||
|
||
error_reporting(E_ALL | E_STRICT); | ||
chdir(__DIR__); | ||
|
||
class Bootstrap | ||
{ | ||
protected static $serviceManager; | ||
|
||
public static function init() | ||
{ | ||
// Load the user-defined test configuration file, if it exists; otherwise, load | ||
$config = include __DIR__ . '/config/application.config.php'; | ||
|
||
static::initAutoloader(); | ||
|
||
$serviceManager = new ServiceManager(new ServiceManagerConfig()); | ||
$serviceManager->setService('ApplicationConfig', $config); | ||
$serviceManager->get('ModuleManager')->loadModules(); | ||
static::$serviceManager = $serviceManager; | ||
} | ||
|
||
public static function getServiceManager() | ||
{ | ||
return static::$serviceManager; | ||
} | ||
|
||
protected static function initAutoloader() | ||
{ | ||
$loader = include __DIR__ . '/init_autoloader.php'; | ||
|
||
AutoloaderFactory::factory(array( | ||
'Zend\Loader\StandardAutoloader' => array( | ||
'autoregister_zf' => true, | ||
'namespaces' => array( | ||
'ApplicationTest' => __DIR__ . '/module/Application/test/ApplicationTest', | ||
'UserTest' => __DIR__ . '/module/User/test/UserTest', | ||
), | ||
), | ||
)); | ||
} | ||
} | ||
|
||
Bootstrap::init(); |
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 |
---|---|---|
|
@@ -22,7 +22,6 @@ | |
'ScnSocialAuth' => '../moduledev/ScnSocialAuth', | ||
'./module', | ||
'./vendor', | ||
'../moduledev', | ||
), | ||
), | ||
); |
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
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,7 +1,29 @@ | ||
<phpunit bootstrap="./Bootstrap.php" colors="true"> | ||
<testsuites> | ||
<testsuite name="Application Module Tests"> | ||
<directory>./ApplicationTest</directory> | ||
</testsuite> | ||
</testsuites> | ||
</phpunit> | ||
<?xml version="1.0"?> | ||
<!-- works fine with PHPUnit-3.6.10 --> | ||
<phpunit | ||
bootstrap="./Bootstrap.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
verbose="true" | ||
stopOnFailure="false" | ||
processIsolation="false" | ||
backupGlobals="false" | ||
syntaxCheck="true" | ||
> | ||
<testsuite name="EdpGithub Module Tests"> | ||
<directory>./ApplicationTest</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log | ||
type="coverage-clover" | ||
target="./clover.xml" | ||
/> | ||
</logging> | ||
</phpunit> |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0"?> | ||
<!-- works fine with PHPUnit-3.6.10 --> | ||
<phpunit | ||
bootstrap="./Bootstrap.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
verbose="true" | ||
stopOnFailure="false" | ||
processIsolation="false" | ||
backupGlobals="false" | ||
syntaxCheck="true" | ||
> | ||
<testsuite name="Test all modules"> | ||
<directory>./module/Application/test/ApplicationTest</directory> | ||
<directory>./module/User/test/UserTest</directory> | ||
</testsuite> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./module/Application/src</directory> | ||
<directory suffix=".php">./module/User/src</directory> | ||
</whitelist> | ||
</filter> | ||
<logging> | ||
<log | ||
type="coverage-clover" | ||
target="./clover.xml" | ||
/> | ||
</logging> | ||
</phpunit> |
Submodule EdpGithub
updated
68 files