/** * @dataProvider dataDelete * @param int $id * @param string $username */ public function testDelete($id, $username) { $controller = $this->getController([], $username); $this->handler->expects($this->once())->method('deleteById')->with($id, $username); $response = $controller->delete($id); $this->assertInstanceOf('OCP\\AppFramework\\Http\\Response', $response); $this->assertSame(Http::STATUS_OK, $response->getStatus()); }
public function testMarkProcessed() { $this->handler->expects($this->once())->method('delete')->with($this->notification); $this->app->markProcessed($this->notification); }