Change API::getProjectByName() to reflect the documentation

This commit is contained in:
Frédéric Guillot
2014-12-09 19:54:43 -05:00
parent 3de00af088
commit 0cd31abbc4
2 changed files with 18 additions and 3 deletions

View File

@@ -80,6 +80,21 @@ class Api extends PHPUnit_Framework_TestCase
$this->assertEquals(1, $project['id']);
}
public function testGetProjectByName()
{
$project = $this->client->getProjectByName('API test');
$this->assertNotEmpty($project);
$this->assertEquals(1, $project['id']);
$project = $this->client->getProjectByName(array('name' => 'API test'));
$this->assertNotEmpty($project);
$this->assertEquals(1, $project['id']);
$project = $this->client->getProjectByName('None');
$this->assertEmpty($project);
$this->assertNull($project);
}
public function testUpdateProject()
{
$project = $this->client->getProjectById(1);