This repository has been archived by the owner on Dec 7, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactorings for Zend -> ZendService namespace change
Added various files: license, readme, composer, travis, testing files
- Loading branch information
1 parent
649120e
commit 5123164
Showing
22 changed files
with
334 additions
and
34 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
vendor/ |
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,17 @@ | ||
language: php | ||
|
||
php: | ||
- 5.3.3 | ||
- 5.3 | ||
- 5.4 | ||
|
||
before_install: | ||
- cp tests/TestConfiguration.php.travis tests/TestConfiguration.php | ||
- curl -s http://getcomposer.org/installer | php | ||
- php composer.phar install --dev | ||
|
||
script: | ||
- php ./tests/run-tests.php | ||
|
||
notifications: | ||
irc: "irc.freenode.org#zftalk.2" |
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,27 @@ | ||
Copyright (c) 2005-2012, Zend Technologies USA, Inc. | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
|
||
* Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
|
||
* Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
* Neither the name of Zend Technologies USA, Inc. nor the names of its | ||
contributors may be used to endorse or promote products derived from this | ||
software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND | ||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR | ||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
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,11 @@ | ||
ZendService\GoGrid component | ||
|
||
You can install using: | ||
|
||
``` | ||
curl -s http://getcomposer.org/installer | php | ||
php composer.phar install | ||
``` | ||
|
||
At that point, follow the instructions in the documentation folder for actual | ||
usage of the component. (Documentation is forthcoming.) |
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,34 @@ | ||
{ | ||
"name": "zendframework/zendservice-gogrid", | ||
"description": "OOP wrapper for the GoGrid web service", | ||
"type": "library", | ||
"keywords": [ | ||
"zf2", | ||
"akismet" | ||
], | ||
"homepage": "http://packages.zendframework.com/", | ||
"license": "BSD-3-Clause", | ||
"autoload": { | ||
"psr-0": { | ||
"ZendService": "library/" | ||
} | ||
}, | ||
"target-dir": "ZendService/GoGrid", | ||
"repositories": [ | ||
{ | ||
"type": "composer", | ||
"url": "http://packages.zendframework.com/" | ||
} | ||
], | ||
"require": { | ||
"php": ">=5.3.3", | ||
"zendframework/zend-http": ">=2.0.0beta5", | ||
"zendframework/zend-uri": ">=2.0.0beta5", | ||
"zendframework/zend-version": ">=2.0.0beta5" | ||
}, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "2.0-dev" | ||
} | ||
} | ||
} |
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
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 |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend | ||
*/ | ||
|
||
/* | ||
* Set error reporting to the level to which Zend Framework code must comply. | ||
*/ | ||
error_reporting( E_ALL | E_STRICT ); | ||
|
||
$phpUnitVersion = PHPUnit_Runner_Version::id(); | ||
if ('@package_version@' !== $phpUnitVersion && version_compare($phpUnitVersion, '3.5.0', '<')) { | ||
echo 'This version of PHPUnit (' . PHPUnit_Runner_Version::id() . ') is not supported in Zend Framework 2.x unit tests.' . PHP_EOL; | ||
exit(1); | ||
} | ||
unset($phpUnitVersion); | ||
|
||
/* | ||
* Determine the root, library, and tests directories of the framework | ||
* distribution. | ||
*/ | ||
$zfRoot = realpath(dirname(__DIR__)); | ||
$zfCoreLibrary = "$zfRoot/library"; | ||
$zfCoreTests = "$zfRoot/tests"; | ||
|
||
/* | ||
* Prepend the Zend Framework library/ and tests/ directories to the | ||
* include_path. This allows the tests to run out of the box and helps prevent | ||
* loading other copies of the framework code and tests that would supersede | ||
* this copy. | ||
*/ | ||
$path = array( | ||
$zfCoreLibrary, | ||
$zfCoreTests, | ||
get_include_path(), | ||
); | ||
set_include_path(implode(PATH_SEPARATOR, $path)); | ||
|
||
/** | ||
* Setup autoloading | ||
*/ | ||
include __DIR__ . '/_autoload.php'; | ||
|
||
/* | ||
* Load the user-defined test configuration file, if it exists; otherwise, load | ||
* the default configuration. | ||
*/ | ||
if (is_readable($zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php')) { | ||
require_once $zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php'; | ||
} else { | ||
require_once $zfCoreTests . DIRECTORY_SEPARATOR . 'TestConfiguration.php.dist'; | ||
} | ||
|
||
if (defined('TESTS_GENERATE_REPORT') && TESTS_GENERATE_REPORT === true) { | ||
$codeCoverageFilter = PHP_CodeCoverage_Filter::getInstance(); | ||
|
||
$lastArg = end($_SERVER['argv']); | ||
if (is_dir($zfCoreTests . '/' . $lastArg)) { | ||
$codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary . '/' . $lastArg); | ||
} else if (is_file($zfCoreTests . '/' . $lastArg)) { | ||
$codeCoverageFilter->addDirectoryToWhitelist(dirname($zfCoreLibrary . '/' . $lastArg)); | ||
} else { | ||
$codeCoverageFilter->addDirectoryToWhitelist($zfCoreLibrary); | ||
} | ||
|
||
/* | ||
* Omit from code coverage reports the contents of the tests directory | ||
*/ | ||
$codeCoverageFilter->addDirectoryToBlacklist($zfCoreTests, ''); | ||
$codeCoverageFilter->addDirectoryToBlacklist(PEAR_INSTALL_DIR, ''); | ||
$codeCoverageFilter->addDirectoryToBlacklist(PHP_LIBDIR, ''); | ||
|
||
unset($codeCoverageFilter); | ||
} | ||
|
||
|
||
/** | ||
* Start output buffering, if enabled | ||
*/ | ||
if (defined('TESTS_ZEND_OB_ENABLED') && constant('TESTS_ZEND_OB_ENABLED')) { | ||
ob_start(); | ||
} | ||
|
||
/* | ||
* Unset global variables that are no longer needed. | ||
*/ | ||
unset($zfRoot, $zfCoreLibrary, $zfCoreTests, $path); |
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,45 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package UnitTests | ||
*/ | ||
|
||
/** | ||
* This file defines configuration for running the unit tests for the Zend | ||
* Framework. Some tests have dependencies to PHP extensions or databases | ||
* which may not necessary installed on the target system. For these cases, | ||
* the ability to disable or configure testing is provided below. Tests for | ||
* components which should run universally are always run by the master | ||
* suite and cannot be disabled. | ||
* | ||
* Do not edit this file. Instead, copy this file to TestConfiguration.php, | ||
* and edit the new file. Never commit passwords to the source code repository. | ||
*/ | ||
|
||
/** | ||
* Use the notation: | ||
* | ||
* defined(...) || define(...); | ||
* | ||
* This ensures that, when a test is marked to run in a separate process, | ||
* PHP will not complain of a constant already being defined. | ||
*/ | ||
|
||
/** | ||
* GENERAL SETTINGS | ||
* | ||
* OB_ENABLED should be enabled for some tests to check if all functionality | ||
* works as expected. Such tests include those for Zend\Soap and Zend\Session, | ||
* which require that headers not be sent in order to work. | ||
*/ | ||
defined('TESTS_ZEND_OB_ENABLED') || define('TESTS_ZEND_OB_ENABLED', false); | ||
|
||
/** | ||
* PHPUnit Code Coverage / Test Report | ||
*/ | ||
defined('TESTS_GENERATE_REPORT') || define('TESTS_GENERATE_REPORT', false); | ||
defined('TESTS_GENERATE_REPORT_TARGET') || define('TESTS_GENERATE_REPORT_TARGET', '/path/to/target'); |
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,20 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package UnitTests | ||
*/ | ||
|
||
/** | ||
* This file defines specific configuration that differs from the standard configuration | ||
* for running the unit tests with Travis-CI (http://www.travis-ci.org) | ||
* | ||
* See TestConfiguration.php.dist to get more details. | ||
* | ||
* Never commit passwords to the source code repository. | ||
*/ | ||
|
||
require_once __DIR__ . '/TestConfiguration.php.dist'; |
Oops, something went wrong.