tims-todo/tests/core/MyControllerTest.php

26 lines
467 B
PHP
Raw Permalink Normal View History

2014-08-08 15:41:59 -04:00
<?php
class MyControllerTest extends Todo_TestCase {
public function setUp()
{
parent::setUp();
}
public function testValidate()
{
$actual = $this->CI->validate('1990-03-09','due_date');
$this->assertTrue($actual);
}
public function testValidateInvalidMethod()
{
$this->setExpectedException(
'InvalidArgumentException',
"Validation callback 'bar' does not exist"
);
$this->CI->validate('foo', 'bar');
}
}
// End of MyControllerTest.php