/** * Test removeWatcher() * * @covers ::removeWatcher * @test * * @return void */ public function testRemoveWatcherCallsPost() { // Test values $getResponse = 'API Response'; // Create the used mock objects $client = $this->getMockBuilder('Redmine\\Client')->disableOriginalConstructor()->getMock(); $client->expects($this->once())->method('delete')->with($this->stringStartsWith('/issues/5/watchers/10.xml'))->willReturn($getResponse); // Create the object under test $api = new Issue($client); // Perform the tests $this->assertSame($getResponse, $api->removeWatcher(5, 10)); }