| @@ 35-53 (lines=19) @@ | ||
| 32 | ||
| 33 | private $controller; |
|
| 34 | ||
| 35 | public function setUp() { |
|
| 36 | $this->appName = 'calendar'; |
|
| 37 | $this->request = $this->getMockBuilder('\OCP\IRequest') |
|
| 38 | ->disableOriginalConstructor() |
|
| 39 | ->getMock(); |
|
| 40 | $this->client = $this->getMockBuilder('\OCP\Http\Client\IClientService') |
|
| 41 | ->disableOriginalConstructor() |
|
| 42 | ->getMock(); |
|
| 43 | ||
| 44 | $this->newClient = $this->getMockBuilder('\OCP\Http\Client\IClient') |
|
| 45 | ->disableOriginalConstructor() |
|
| 46 | ->getMock(); |
|
| 47 | $this->response = $this->getMockBuilder('\OCP\Http\Client\IResponse') |
|
| 48 | ->disableOriginalConstructor() |
|
| 49 | ->getMock(); |
|
| 50 | ||
| 51 | $this->controller = new ProxyController($this->appName, |
|
| 52 | $this->request, $this->client); |
|
| 53 | } |
|
| 54 | ||
| 55 | public function testProxy() { |
|
| 56 | $testUrl = 'http://abc.def/foobar?123'; |
|
| @@ 66-84 (lines=19) @@ | ||
| 63 | ||
| 64 | private $controller; |
|
| 65 | ||
| 66 | public function setUp() { |
|
| 67 | $this->appName = 'calendar'; |
|
| 68 | $this->request = $this->getMockBuilder('\OCP\IRequest') |
|
| 69 | ->disableOriginalConstructor() |
|
| 70 | ->getMock(); |
|
| 71 | $this->config = $this->getMockBuilder('\OCP\IConfig') |
|
| 72 | ->disableOriginalConstructor() |
|
| 73 | ->getMock(); |
|
| 74 | $this->userSession = $this->getMockBuilder('\OCP\IUserSession') |
|
| 75 | ->disableOriginalConstructor() |
|
| 76 | ->getMock(); |
|
| 77 | ||
| 78 | $this->dummyUser = $this->getMockBuilder('OCP\IUser') |
|
| 79 | ->disableOriginalConstructor() |
|
| 80 | ->getMock(); |
|
| 81 | ||
| 82 | $this->controller = new ViewController($this->appName, $this->request, |
|
| 83 | $this->userSession, $this->config); |
|
| 84 | } |
|
| 85 | ||
| 86 | /** |
|
| 87 | * @dataProvider indexDataProvider |
|