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

Commit

Permalink
Merge branch 'namespace_cleanup'
Browse files Browse the repository at this point in the history
Conflicts:
	library/Zend/Feed/Reader/Reader.php
  • Loading branch information
weierophinney committed Jul 6, 2010
2 parents 2de039c + 3535380 commit a4b177e
Show file tree
Hide file tree
Showing 13 changed files with 27 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/DbAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public function closeConnection()
/**
* Prepare a statement and return a PDOStatement-like object.
*
* @param string|\Zend\DB\Select\Select $sql SQL query
* @param string|\Zend\DB\Select $sql SQL query
* @return Zend_Db_Statment|PDOStatement
*/
public function prepare($sql)
Expand Down
4 changes: 2 additions & 2 deletions src/DbStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
* Testing Database Statement that acts as a stack to SQL resultsets.
*
* @uses \Zend\DB\Statement\Exception
* @uses \Zend\DB\Statement\StatementInterface
* @uses \Zend\DB\Statement
* @category Zend
* @package Zend_Test
* @subpackage PHPUnit
* @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
class DbStatement implements Statement\StatementInterface
class DbStatement implements Statement
{
/**
* @var array
Expand Down
8 changes: 4 additions & 4 deletions src/PHPUnit/ControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
*
* @uses PHPUnit_Framework_TestCase
* @uses PHPUnit_Runner_Version
* @uses \Zend\Controller\Action\HelperBroker\HelperBroker
* @uses \Zend\Controller\Action\HelperBroker
* @uses \Zend\Controller\Front
* @uses \Zend\Controller\Request\HttpTestCase
* @uses \Zend\Controller\Response\HttpTestCase
Expand Down Expand Up @@ -172,11 +172,11 @@ final public function bootstrap()
public function dispatch($url = null)
{
// redirector should not exit
$redirector = HelperBroker\HelperBroker::getStaticHelper('redirector');
$redirector = HelperBroker::getStaticHelper('redirector');
$redirector->setExit(false);

// json helper should not exit
$json = HelperBroker\HelperBroker::getStaticHelper('JSON');
$json = HelperBroker::getStaticHelper('JSON');
$json->suppressExit = true;

$request = $this->getRequest();
Expand Down Expand Up @@ -217,7 +217,7 @@ public function reset()
$this->resetRequest();
$this->resetResponse();
\Zend\Layout\Layout::resetMvcInstance();
HelperBroker\HelperBroker::resetHelpers();
HelperBroker::resetHelpers();
$this->frontController->resetInstance();
//\Zend\Session\Manager::$_unitTestEnabled = true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/PHPUnit/DatabaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ protected function createDbTable(\Zend\DB\Table\AbstractTable $table, $where=nul
/**
* Create a data table based on a Zend_Db_Table_Rowset instance
*
* @param \Zend\DB\Table\Rowset\AbstractRowset $rowset
* @param \Zend\DB\Table\AbstractRowset $rowset
* @param string
* @return \Zend\Test\PHPUnit\Db\DataSet\DbRowset
*/
protected function createDbRowset(\Zend\DB\Table\Rowset\AbstractRowset $rowset, $tableName = null)
protected function createDbRowset(\Zend\DB\Table\AbstractRowset $rowset, $tableName = null)
{
return new Db\DataSet\DbRowset($rowset, $tableName);
}
Expand Down
6 changes: 3 additions & 3 deletions src/PHPUnit/Db/DataSet/DbRowset.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @uses PHPUnit_Extensions_Database_DataSet_AbstractTable
* @uses PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData
* @uses \Zend\DB\Table\Rowset\AbstractRowset
* @uses \Zend\DB\Table\AbstractRowset
* @uses \Zend\Test\PHPUnit\Db\Exception
* @category Zend
* @package Zend_Test
Expand All @@ -43,10 +43,10 @@ class DbRowset extends \PHPUnit_Extensions_Database_DataSet_AbstractTable
/**
* Construct Table object from a Zend_Db_Table_Rowset
*
* @param \Zend\DB\Table\Rowset\AbstractRowset $rowset
* @param \Zend\DB\Table\AbstractRowset $rowset
* @param string $tableName
*/
public function __construct(\Zend\DB\Table\Rowset\AbstractRowset $rowset, $tableName = null)
public function __construct(\Zend\DB\Table\AbstractRowset $rowset, $tableName = null)
{
if($tableName == null) {
$table = $rowset->getTable();
Expand Down
4 changes: 2 additions & 2 deletions src/PHPUnit/Db/DataSet/DbTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class DbTable extends \PHPUnit_Extensions_Database_DataSet_QueryTable
* Construct Dataset Table from Zend_Db_Table object
*
* @param \Zend\DB\Table\AbstractTable $table
* @param string|\Zend\DB\Select\Select|null $where
* @param string|\Zend\DB\Select|null $where
* @param string|null $order
* @param int $count
* @param int $offset
Expand Down Expand Up @@ -103,7 +103,7 @@ protected function loadData()
$this->data = $this->_table->fetchAll(
$this->_where, $this->_order, $this->_count, $this->_offset
);
if($this->data instanceof \Zend\DB\Table\Rowset\AbstractRowset) {
if($this->data instanceof \Zend\DB\Table\AbstractRowset) {
$this->data = $this->data->toArray();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/PHPUnit/Db/DataSet/DbTableDataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class DbTableDataSet extends \PHPUnit_Extensions_Database_DataSet_AbstractDataSe
* By default a select * will be done on the given tablename.
*
* @param \Zend\DB\Table\AbstractTable $table
* @param string|\Zend\DB\Select\Select $query
* @param string|\Zend\DB\Select $query
* @param string $where
* @param string $order
* @param string $count
Expand Down
8 changes: 4 additions & 4 deletions src/PHPUnit/Db/DataSet/QueryDataSet.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @uses PHPUnit_Extensions_Database_DataSet_QueryDataSet
* @uses PHPUnit_Extensions_Database_DB_IDatabaseConnection
* @uses \Zend\DB\Select\Select
* @uses \Zend\DB\Select
* @uses \Zend\Test\PHPUnit\Db\DataSet\QueryTable
* @uses \Zend\Test\PHPUnit\Db\Exception
* @category Zend
Expand Down Expand Up @@ -61,16 +61,16 @@ public function __construct(\PHPUnit_Extensions_Database_DB_IDatabaseConnection
* By default a select * will be done on the given tablename.
*
* @param string $tableName
* @param string|\Zend\DB\Select\Select $query
* @param string|\Zend\DB\Select $query
*/
public function addTable($tableName, $query = \NULL)
{
if ($query === NULL) {
$query = $this->databaseConnection->getConnection()->select();
$query->from($tableName, Select\Select::SQL_WILDCARD);
$query->from($tableName, Select::SQL_WILDCARD);
}

if($query instanceof Select\Select) {
if($query instanceof Select) {
$query = $query->__toString();
}

Expand Down
2 changes: 1 addition & 1 deletion test/PHPUnit/ControllerTestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
namespace ZendTest\Test\PHPUnit;
use Zend\Application,
Zend\Controller,
Zend\Controller\Action\HelperBroker\HelperBroker,
Zend\Controller\Action\HelperBroker,
Zend\Controller\Dispatcher,
Zend\Controller\Plugin,
Zend\Controller\Request,
Expand Down
6 changes: 3 additions & 3 deletions test/PHPUnit/Db/DataSet/DbRowsetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected function getRowSet()
'rowClass' => 'stdClass',
'data' => array(array('foo' => 'bar'), array('foo' => 'baz')),
);
$rowset = new \Zend\DB\Table\Rowset\Rowset($config);
$rowset = new \Zend\DB\Table\Rowset($config);
return $rowset;
}

Expand All @@ -68,7 +68,7 @@ public function testRowset_ConstructWithDisconnectedRowset_NoTableName_ThrowsExc
{
$this->setExpectedException("Zend\Test\PHPUnit\Db\Exception");

$rowset = $this->getMock('Zend\Db\Table\Rowset\AbstractRowset', array(), array(), '', false);
$rowset = $this->getMock('Zend\Db\Table\AbstractRowset', array(), array(), '', false);
$rowset->expects($this->once())
->method('getTable')
->will($this->returnValue(null));
Expand All @@ -86,7 +86,7 @@ public function testRowset_WithNoRows_GetColumnsFromTable()
->with($this->equalTo('cols'))
->will($this->returnValue($columns));

$rowset = $this->getMock('Zend\Db\Table\Rowset\AbstractRowset', array(), array(), '', false);
$rowset = $this->getMock('Zend\Db\Table\AbstractRowset', array(), array(), '', false);
$rowset->expects($this->exactly(2))
->method('getTable')
->will($this->returnValue($tableMock));
Expand Down
4 changes: 2 additions & 2 deletions test/PHPUnit/Db/DataSet/QueryDataSetTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testAddTableWithoutQueryParameterCreatesSelectWildcardAll()
$fixtureTableName = "foo";

$adapterMock = $this->getMock('Zend\Test\DbAdapter');
$selectMock = $this->getMock('Zend\DB\Select\Select', array(), array($adapterMock));
$selectMock = $this->getMock('Zend\DB\Select', array(), array($adapterMock));

$adapterMock->expects($this->once())
->method('select')
Expand All @@ -63,7 +63,7 @@ public function testAddTableWithoutQueryParameterCreatesSelectWildcardAll()

$selectMock->expects($this->once())
->method('from')
->with($fixtureTableName, \Zend\DB\Select\Select::SQL_WILDCARD);
->with($fixtureTableName, \Zend\DB\Select::SQL_WILDCARD);
$selectMock->expects($this->once())
->method('__toString')
->will($this->returnValue('SELECT * FOM foo'));
Expand Down
2 changes: 1 addition & 1 deletion test/PHPUnit/Db/TestCaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function testCreateDbTableConvenienceMethodReturnType()

public function testCreateDbRowsetConvenienceMethodReturnType()
{
$mock = $this->getMock('Zend\DB\Table\Rowset\Rowset', array(), array(array()));
$mock = $this->getMock('Zend\DB\Table\Rowset', array(), array(array()));
$mock->expects($this->once())->method('toArray')->will($this->returnValue(array("foo" => 1, "bar" => 1)));

$rowset = $this->createDbRowset($mock, "fooTable");
Expand Down
2 changes: 1 addition & 1 deletion test/PHPUnit/_files/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
->registerPlugin($plugin)
->setRouter($router)
->setDispatcher($dispatcher);
$viewRenderer = \Zend\Controller\Action\HelperBroker\HelperBroker::getStaticHelper('ViewRenderer');
$viewRenderer = \Zend\Controller\Action\HelperBroker::getStaticHelper('ViewRenderer');
\Zend\Registry::set('router', $router);
\Zend\Registry::set('dispatcher', $dispatcher);
\Zend\Registry::set('plugin', $plugin);
Expand Down

0 comments on commit a4b177e

Please sign in to comment.