Add some tests

This commit is contained in:
Frederic Guillot
2015-09-18 22:37:00 -04:00
parent 1fa72295f2
commit e8228c3975
11 changed files with 208 additions and 87 deletions

View File

@@ -133,6 +133,17 @@ class ProjectTest extends Base
$this->assertGreaterThan($now, $project['last_modified']);
}
public function testGetAllIds()
{
$p = new Project($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest')));
$this->assertEmpty($p->getAllByIds(array()));
$this->assertNotEmpty($p->getAllByIds(array(1, 2)));
$this->assertCount(1, $p->getAllByIds(array(1)));
}
public function testIsLastModified()
{
$p = new Project($this->container);