Skip to content
This repository has been archived by the owner on Jan 31, 2020. It is now read-only.

Commit

Permalink
Merge branch 'zf2/master' into milestones/autoloading
Browse files Browse the repository at this point in the history
- Bring milestones/autoloading branch up-to-date with current master

Conflicts:
	library/Zend/Loader/Autoloader.php
	library/Zend/Loader/PluginLoader.php
	library/Zend/Serializer/Serializer.php
	library/Zend/View/AbstractView.php
	library/Zend/View/View.php
	library/Zend/View/ViewEngine.php
	tests/Zend/Loader/AutoloaderTest.php
	tests/Zend/View/ViewTest.php
  • Loading branch information
weierophinney committed Oct 28, 2010
2 parents 9ba9f17 + 59b5f1f commit 9eedf95
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/AbstractManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Configuration/SessionConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
3 changes: 1 addition & 2 deletions src/Configuration/StandardConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand All @@ -26,7 +25,7 @@

use Zend\Session\Configuration as Configurable,
Zend\Session\Exception as SessionException,
Zend\Validator\Hostname\Hostname as HostnameValidator,
Zend\Validator\Hostname as HostnameValidator,
Zend\Filter\Word\CamelCaseToUnderscore as CamelCaseToUnderscoreFilter;

/**
Expand Down
1 change: 0 additions & 1 deletion src/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @since Preview Release 0.2
*/

Expand Down
1 change: 0 additions & 1 deletion src/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/SaveHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @since Preview Release 0.2
*/

Expand Down
1 change: 0 additions & 1 deletion src/SaveHandler/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

namespace Zend\Session\SaveHandler;
Expand Down
1 change: 0 additions & 1 deletion src/SaveHandler/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

namespace Zend\Session\SaveHandler;
Expand Down
1 change: 0 additions & 1 deletion src/SessionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Storage/ArrayStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Storage/SessionStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

/**
Expand Down
1 change: 0 additions & 1 deletion src/Validator/HttpUserAgent.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
* @package Zend_Session
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
* @since Preview Release 0.2
*/

Expand Down
22 changes: 22 additions & 0 deletions test/ContainerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class ContainerTest extends \PHPUnit_Framework_TestCase
{
public function setUp()
{
$this->forceAutoloader();
$_SESSION = array();
Container::setDefaultManager(null);
$this->manager = $manager = new TestAsset\TestManager(array(
Expand All @@ -25,6 +26,27 @@ public function tearDown()
Container::setDefaultManager(null);
}

protected function forceAutoloader()
{
$splAutoloadFunctions = spl_autoload_functions();
if (!$splAutoloadFunctions || !in_array('ZendTest_Autoloader', $splAutoloadFunctions)) {
include __DIR__ . '/../../_autoload.php';
}
}

/**
* Hack to allow running tests in separate processes
*
* @see http://matthewturland.com/2010/08/19/process-isolation-in-phpunit/
* @param PHPUnit_Framework_TestResult $result
* @return void
*/
public function run(\PHPUnit_Framework_TestResult $result = NULL)
{
$this->setPreserveGlobalState(false);
return parent::run($result);
}

public function testInstantiationStartsSession()
{
$this->manager->destroy();
Expand Down
1 change: 0 additions & 1 deletion test/SaveHandler/DbTableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* @subpackage UnitTests
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @version $Id$
*/

namespace ZendTest\Session\SaveHandler;
Expand Down
22 changes: 22 additions & 0 deletions test/SessionManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,33 @@ class SessionManagerTest extends \PHPUnit_Framework_TestCase

public function setUp()
{
$this->forceAutoloader();
$this->error = false;
$this->manager = new SessionManager();
Registry::_unsetInstance();
}

protected function forceAutoloader()
{
$splAutoloadFunctions = spl_autoload_functions();
if (!$splAutoloadFunctions || !in_array('ZendTest_Autoloader', $splAutoloadFunctions)) {
include __DIR__ . '/../../_autoload.php';
}
}

/**
* Hack to allow running tests in separate processes
*
* @see http://matthewturland.com/2010/08/19/process-isolation-in-phpunit/
* @param PHPUnit_Framework_TestResult $result
* @return void
*/
public function run(\PHPUnit_Framework_TestResult $result = NULL)
{
$this->setPreserveGlobalState(false);
return parent::run($result);
}

public function handleErrors($errno, $errstr)
{
$this->error = $errstr;
Expand Down

0 comments on commit 9eedf95

Please sign in to comment.