mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Adding test cases for TextHelper::toList()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6765 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7985746190
commit
4519261b39
1 changed files with 11 additions and 1 deletions
|
@ -26,7 +26,9 @@
|
|||
* @lastmodified $Date$
|
||||
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
||||
*/
|
||||
uses('view'.DS.'helpers'.DS.'app_helper', 'view'.DS.'helper', 'view'.DS.'helpers'.DS.'text');
|
||||
App::import('Core', array('Helper', 'AppHelper'));
|
||||
App::import('Helper', 'Text');
|
||||
|
||||
/**
|
||||
* Short description for class.
|
||||
*
|
||||
|
@ -178,6 +180,14 @@ class TextTest extends UnitTestCase {
|
|||
$this->assertEqual($expected, $result);
|
||||
}
|
||||
|
||||
function testListGeneration() {
|
||||
$result = $this->Text->toList(array('Larry', 'Curly', 'Moe'));
|
||||
$this->assertEqual($result, 'Larry, Curly and Moe');
|
||||
|
||||
$result = $this->Text->toList(array('Dusty', 'Lucky', 'Ned'), 'y');
|
||||
$this->assertEqual($result, 'Dusty, Lucky y Ned');
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
unset($this->Text);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue