Skip to content

Commit 159689e

Browse files
committed
fix tests
1 parent 36746f1 commit 159689e

7 files changed

+6
-15
lines changed

test/Redmine/Tests/Api/GroupTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ public function testRemoveUserCallsDelete()
432432
->method('delete')
433433
->with(
434434
$this->logicalAnd(
435-
$this->stringStartsWith('/groups/5/user/10'),
435+
$this->stringStartsWith('/groups/5/users/10'),
436436
$this->logicalXor(
437437
$this->stringEndsWith('.json'),
438438
$this->stringEndsWith('.xml')

test/Redmine/Tests/Api/ProjectTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ public function testCreateThrowsExceptionWithEmptyParameters()
318318
$api = new Project($client);
319319

320320
// Perform the tests
321-
$this->assertSame($getResponse, $api->create(5));
321+
$this->assertSame($getResponse, $api->create(array('id' => 5)));
322322
}
323323

324324
/**

test/Redmine/Tests/Api/TimeEntryTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function testCreateThrowsExceptionWithEmptyParameters()
163163
$api = new TimeEntry($client);
164164

165165
// Perform the tests
166-
$this->assertSame($getResponse, $api->create(5));
166+
$this->assertSame($getResponse, $api->create(array('id' => 5)));
167167
}
168168

169169
/**

test/Redmine/Tests/IssueCategoryXmlTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testCreateBlank()
2222

2323
$xml = '<?xml version="1.0"?>
2424
<issue_category/>';
25-
$res = $this->client->api('issue_category')->create();
25+
$res = $this->client->api('issue_category')->create('aProject');
2626
$this->assertEquals($this->formatXml($xml), $this->formatXml($res));
2727
}
2828

test/Redmine/Tests/MembershipXmlTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public function testCreateBlank()
2222

2323
$xml = '<?xml version="1.0"?>
2424
<membership/>';
25-
$res = $this->client->api('membership')->create();
25+
$res = $this->client->api('membership')->create('aProject');
2626
$this->assertEquals($this->formatXml($xml), $this->formatXml($res));
2727
}
2828

test/Redmine/Tests/UrlTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testGroup()
4848
$this->assertEquals($res, array('path' => '/groups/1/users.xml', 'method' => 'POST'));
4949

5050
$res = $this->client->api('group')->removeUser(1, 1);
51-
$this->assertEquals($res, array('path' => '/groups/1/user/1.xml', 'method' => 'DELETE'));
51+
$this->assertEquals($res, array('path' => '/groups/1/users/1.xml', 'method' => 'DELETE'));
5252
}
5353

5454
public function testIssue()

test/Redmine/Tests/WikiXmlTest.php

-9
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,6 @@ public function setup()
1313
$this->client = new TestClient('http://test.local', 'asdf');
1414
}
1515

16-
/**
17-
* @expectedException Exception
18-
*/
19-
public function testCreateBlank()
20-
{
21-
$this->assertInstanceOf('Redmine\Api\Wiki', $this->client->api('wiki'));
22-
$res = $this->client->api('wiki')->create();
23-
}
24-
2516
public function testCreateComplex()
2617
{
2718
$res = $this->client->api('wiki')->create('testProject', 'about', array(

0 commit comments

Comments
 (0)