Created
December 4, 2013 11:03
-
-
Save johannesnagl/7785824 to your computer and use it in GitHub Desktop.
Simple test for my presentation
This file contains hidden or 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
<?php | |
App::uses('Controller', 'Controller'); | |
App::uses('View', 'View'); | |
App::uses('ArticleHelper', 'View/Helper'); | |
class ArticleHelperTest extends CakeTestCase { | |
public function setUp() { | |
parent::setUp(); | |
$Controller = new Controller(); | |
$View = new View($Controller); | |
$this->Article = new ArticleHelper($View); | |
} | |
public function testGetCellClass() { | |
$result = $this->Article->getCellClass(strtotime('now')); | |
$this->assertEqual('calendar-day-today', $result); | |
$result = $this->Article->getCellClass(strtotime('tomorrow')); | |
$this->assertEqual('calendar-day-future', $result); | |
$result = $this->Article->getCellClass(strtotime('yesterday')); | |
$this->assertEqual('calendar-day-past', $result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment