CC-5651: Unit Test the Scheduler
* Continued refactoring of the database creation. * Database now persists after running tests but most of the tables are cleared. * The unit tests run WAY faster now. :-)
This commit is contained in:
parent
aa2e084a09
commit
162a873f9d
8 changed files with 109 additions and 18 deletions
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
require_once "../application/configs/conf.php";
|
||||
require_once "TestHelper.php";
|
||||
require_once "Preference.php";
|
||||
|
||||
class PreferenceUnitTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
public function setUp()
|
||||
{
|
||||
TestHelper::installTestDatabase();
|
||||
TestHelper::setupZendBootstrap();
|
||||
}
|
||||
|
||||
public function testSetHeadTitle()
|
||||
{
|
||||
$title = "unit test";
|
||||
Application_Model_Preference::SetHeadTitle($title);
|
||||
$this->assertEquals(Application_Model_Preference::GetHeadTitle(), $title);
|
||||
}
|
||||
|
||||
public function testSetShowsPopulatedUntil()
|
||||
{
|
||||
$date = new DateTime();
|
||||
Application_Model_Preference::SetShowsPopulatedUntil($date);
|
||||
$this->assertEquals(Application_Model_Preference::GetShowsPopulatedUntil(), $date);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue