[Pkg-owncloud-commits] [owncloud] 52/103: check the called URL
David Prévot
taffit at moszumanska.debian.org
Sun May 31 12:32:37 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag v8.0.4RC1
in repository owncloud.
commit b1a9e26c453316ef27915bfedf2f1435cd443952
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Mon Apr 27 17:14:52 2015 +0200
check the called URL
---
apps/files_sharing/tests/external/managertest.php | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/apps/files_sharing/tests/external/managertest.php b/apps/files_sharing/tests/external/managertest.php
index 4158b1b..3a88c78 100644
--- a/apps/files_sharing/tests/external/managertest.php
+++ b/apps/files_sharing/tests/external/managertest.php
@@ -23,16 +23,20 @@
namespace OCA\Files_Sharing\Tests\External;
use OC\Files\Storage\StorageFactory;
+use OCA\Files_Sharing\External\Manager;
use OCA\Files_Sharing\Tests\TestCase;
class ManagerTest extends TestCase {
- /** @var \OCA\Files_Sharing\External\Manager **/
+ /** @var Manager **/
private $manager;
/** @var \OC\Files\Mount\Manager */
private $mountManager;
+ /** @var \PHPUnit_Framework_MockObject_MockObject */
+ private $httpHelper;
+
private $uid;
protected function setUp() {
@@ -40,16 +44,22 @@ class ManagerTest extends TestCase {
$this->uid = $this->getUniqueID('user');
$this->mountManager = new \OC\Files\Mount\Manager();
- $this->manager = new \OCA\Files_Sharing\External\Manager(
+ $this->httpHelper = $httpHelper = $this->getMockBuilder('\OC\HTTPHelper')->disableOriginalConstructor()->getMock();
+ /** @var \OC\HTTPHelper $httpHelper */
+ $this->manager = new Manager(
\OC::$server->getDatabaseConnection(),
$this->mountManager,
new StorageFactory(),
- $this->getMockBuilder('\OC\HTTPHelper')->disableOriginalConstructor()->getMock(),
+ $httpHelper,
$this->uid
);
}
public function testAddShare() {
+ $this->httpHelper->expects($this->exactly(4))
+ ->method('post')
+ ->with($this->stringStartsWith('http://localhost/ocs/v1.php/cloud/shares'), $this->anything());
+
$shareData1 = [
'remote' => 'http://localhost',
'token' => 'token1',
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list