38 lines
966 B
PHP
Executable file
38 lines
966 B
PHP
Executable file
<?php
|
|
/* SVN FILE: $Id$ */
|
|
/* Currency Test cases generated on: 2008-10-03 00:10:17 : 1222957517*/
|
|
App::import('Model', 'Currency');
|
|
|
|
class TestCurrency extends Currency {
|
|
var $cacheSources = false;
|
|
var $useDbConfig = 'test_suite';
|
|
}
|
|
|
|
class CurrencyTestCase extends CakeTestCase {
|
|
var $Currency = null;
|
|
var $fixtures = array('app.currency', 'app.country', 'app.principle', 'app.quoted_product');
|
|
|
|
function start() {
|
|
parent::start();
|
|
$this->Currency = new TestCurrency();
|
|
}
|
|
|
|
function testCurrencyInstance() {
|
|
$this->assertTrue(is_a($this->Currency, 'Currency'));
|
|
}
|
|
|
|
function testCurrencyFind() {
|
|
$results = $this->Currency->recursive = -1;
|
|
$results = $this->Currency->find('first');
|
|
$this->assertTrue(!empty($results));
|
|
|
|
$expected = array('Currency' => array(
|
|
'id' => 1,
|
|
'name' => 'Lorem ipsum dolor sit amet',
|
|
'symbol' => 'Lorem ipsum dolor sit ame',
|
|
'iso4217' => 'L'
|
|
));
|
|
$this->assertEqual($results, $expected);
|
|
}
|
|
}
|
|
?>
|