From 359bbce3afa1e00c1e62a9f3e2349994d4ac8f49 Mon Sep 17 00:00:00 2001 From: Côme Chilliet Date: Tue, 3 Sep 2024 15:18:16 +0200 Subject: chore: Adapt tests to OC_API refactoring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- tests/lib/OCS/ApiHelperTest.php | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 tests/lib/OCS/ApiHelperTest.php (limited to 'tests/lib/OCS/ApiHelperTest.php') diff --git a/tests/lib/OCS/ApiHelperTest.php b/tests/lib/OCS/ApiHelperTest.php new file mode 100644 index 00000000000..fdbc1f4c538 --- /dev/null +++ b/tests/lib/OCS/ApiHelperTest.php @@ -0,0 +1,54 @@ +getMockBuilder(IRequest::class) + ->disableOriginalConstructor() + ->getMock(); + $request + ->expects($this->once()) + ->method('getScriptName') + ->willReturn($scriptName); + + $this->assertEquals($expected, $this->invokePrivate(new ApiHelper, 'isV2', [$request])); + } +} -- cgit v1.2.3