-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
doc block updates and timeline helper
- Loading branch information
euromark
committed
Sep 16, 2013
1 parent
11d6430
commit 1527cce
Showing
17 changed files
with
328 additions
and
28 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
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
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,71 @@ | ||
<?php | ||
|
||
App::uses('TimelineHelper', 'Tools.View/Helper'); | ||
App::uses('MyCakeTestCase', 'Tools.TestSuite'); | ||
App::uses('HtmlHelper', 'View/Helper'); | ||
App::uses('View', 'View'); | ||
|
||
/** | ||
* Timeline Helper Test Case | ||
*/ | ||
class TimelineHelperTest extends MyCakeTestCase { | ||
|
||
public $Timeline; | ||
|
||
/** | ||
* TimelineHelperTest::setUp() | ||
* | ||
* @return void | ||
*/ | ||
public function setUp() { | ||
parent::setUp(); | ||
|
||
$this->Timeline = new TimelineTestHelper(new View(null)); | ||
$this->Timeline->Html = new HtmlHelper(new View(null)); | ||
} | ||
|
||
/** | ||
* @return void | ||
*/ | ||
public function testAddItem() { | ||
$data = array( | ||
'start' => '', | ||
'content' => '', | ||
); | ||
$this->Timeline->addItem($data); | ||
$items = $this->Timeline->items(); | ||
$this->assertSame(1, count($items)); | ||
|
||
$data = array( | ||
array( | ||
'start' => '', | ||
'content' => '', | ||
), | ||
array( | ||
'start' => '', | ||
'content' => '', | ||
) | ||
); | ||
$this->Timeline->addItems($data); | ||
$items = $this->Timeline->items(); | ||
$this->assertSame(3, count($items)); | ||
} | ||
|
||
public function tearDown() { | ||
parent::tearDown(); | ||
|
||
unset($this->Timeline); | ||
} | ||
|
||
} | ||
|
||
class TimelineTestHelper extends TimelineHelper { | ||
|
||
/** | ||
* @return array | ||
*/ | ||
public function items() { | ||
return $this->_items; | ||
} | ||
|
||
} |
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
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
Oops, something went wrong.