This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zendframework/zendframework#5379] Move test assets to separate files
- Moved classes, functions used by test case to separate files
- Loading branch information
1 parent
6c7b1b9
commit cf6868a
Showing
4 changed files
with
121 additions
and
89 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,42 @@ | ||
<?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 | ||
*/ | ||
|
||
namespace ZendTest\Json\TestAsset; | ||
|
||
class Bar | ||
{ | ||
protected $val; | ||
|
||
public function __construct($someval) | ||
{ | ||
$this->val = $someval; | ||
} | ||
/** | ||
* Bar | ||
* | ||
* @param bool $one | ||
* @param string $two | ||
* @param mixed $three | ||
* @return array | ||
*/ | ||
public function foo($one, $two = 'two', $three = null) | ||
{ | ||
return array($one, $two, $three, $this->val); | ||
} | ||
|
||
/** | ||
* Baz | ||
* | ||
* @return void | ||
*/ | ||
public function baz() | ||
{ | ||
throw new \Exception('application error'); | ||
} | ||
} |
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,39 @@ | ||
<?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 | ||
*/ | ||
|
||
namespace ZendTest\Json\TestAsset; | ||
|
||
/** | ||
* Class for testing JSON-RPC server | ||
*/ | ||
class Foo | ||
{ | ||
/** | ||
* Bar | ||
* | ||
* @param bool $one | ||
* @param string $two | ||
* @param mixed $three | ||
* @return array | ||
*/ | ||
public function bar($one, $two = 'two', $three = null) | ||
{ | ||
return array($one, $two, $three); | ||
} | ||
|
||
/** | ||
* Baz | ||
* | ||
* @return void | ||
*/ | ||
public function baz() | ||
{ | ||
throw new \Exception('application error'); | ||
} | ||
} |
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-2013 Zend Technologies USA Inc. (http://www.zend.com) | ||
* @license http://framework.zend.com/license/new-bsd New BSD License | ||
*/ | ||
|
||
namespace ZendTest\Json\TestAsset; | ||
|
||
/** | ||
* Test function for JSON-RPC server | ||
* | ||
* @return bool | ||
*/ | ||
function FooFunc() | ||
{ | ||
return true; | ||
} |