forked from zendframework/zendframework
-
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.
Adding integration tests for the aggregate hydrator
- Loading branch information
Showing
3 changed files
with
202 additions
and
14 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
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,60 @@ | ||
<?php | ||
/** | ||
* Zend Framework (http://framework.zend.com/) | ||
* | ||
* @link http://github.com/zendframework/zf2 for the canonical source repository | ||
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
* @package Zend_Stdlib | ||
*/ | ||
|
||
namespace ZendTest\Stdlib\TestAsset; | ||
|
||
/** | ||
* Test asset to verify that a composition of a class-methods and an array-serializable | ||
* hydrator produces the expected output | ||
*/ | ||
class AggregateObject | ||
{ | ||
/** | ||
* @var array | ||
*/ | ||
public $arrayData = array('president' => 'Zaphod'); | ||
|
||
/** | ||
* @var string | ||
*/ | ||
public $maintainer = 'Marvin'; | ||
|
||
/** | ||
* @return string | ||
*/ | ||
public function getMaintainer() | ||
{ | ||
return $this->maintainer; | ||
} | ||
|
||
/** | ||
* @param string $maintainer | ||
*/ | ||
public function setMaintainer($maintainer) | ||
{ | ||
$this->maintainer = $maintainer; | ||
} | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function getArrayCopy() | ||
{ | ||
return $this->arrayData; | ||
} | ||
|
||
/** | ||
* @param array $data | ||
*/ | ||
public function exchangeArray(array $data) | ||
{ | ||
$this->arrayData = $data; | ||
} | ||
} |