Browse Source

Fix namespace in share/

tags/v9.1.0beta1
Joas Schilling 8 years ago
parent
commit
a107e7de7b
No account linked to committer's email address

+ 8
- 6
tests/lib/share/MailNotificationsTest.php View File

@@ -19,6 +19,8 @@
*
*/

namespace Test\Share;

use OC\Share\MailNotifications;
use OCP\IL10N;
use OCP\IUser;
@@ -33,15 +35,15 @@ use OCP\IURLGenerator;
class MailNotificationsTest extends \Test\TestCase {
/** @var IL10N */
private $l10n;
/** @var IMailer | PHPUnit_Framework_MockObject_MockObject */
/** @var IMailer | \PHPUnit_Framework_MockObject_MockObject */
private $mailer;
/** @var ILogger */
private $logger;
/** @var Defaults | PHPUnit_Framework_MockObject_MockObject */
/** @var Defaults | \PHPUnit_Framework_MockObject_MockObject */
private $defaults;
/** @var IUser | PHPUnit_Framework_MockObject_MockObject */
/** @var IUser | \PHPUnit_Framework_MockObject_MockObject */
private $user;
/** @var IURLGenerator | PHPUnit_Framework_MockObject_MockObject */
/** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator;


@@ -209,7 +211,7 @@ class MailNotificationsTest extends \Test\TestCase {
public function testSendInternalShareMail() {
$this->setupMailerMock('TestUser shared »welcome.txt« with you', ['recipient@owncloud.com' => 'Recipient'], false);

/** @var MailNotifications | PHPUnit_Framework_MockObject_MockObject $mailNotifications */
/** @var MailNotifications | \PHPUnit_Framework_MockObject_MockObject $mailNotifications */
$mailNotifications = $this->getMock('OC\Share\MailNotifications',['getItemSharedWithUser'], [
$this->user,
$this->l10n,
@@ -286,7 +288,7 @@ class MailNotificationsTest extends \Test\TestCase {
->expects($this->once())
->method('send')
->with($message)
->will($this->throwException(new Exception('Some Exception Message')));
->will($this->throwException(new \Exception('Some Exception Message')));
}
}
}

+ 3
- 1
tests/lib/share/backend.php View File

@@ -19,7 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/

class Test_Share_Backend implements OCP\Share_Backend {
namespace Test\Share;

class Backend implements \OCP\Share_Backend {

const FORMAT_SOURCE = 0;
const FORMAT_TARGET = 1;

+ 4
- 2
tests/lib/share/helper.php View File

@@ -19,11 +19,13 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/

namespace Test\Share;

/**
* @group DB
* Class Test_Share_Helper
* Class Helper
*/
class Test_Share_Helper extends \Test\TestCase {
class Helper extends \Test\TestCase {

public function expireDateProvider() {
return array(

+ 3
- 1
tests/lib/share/searchresultsorter.php View File

@@ -19,7 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/

class Test_Share_Search extends \Test\TestCase {
namespace Test\Share;

class SearchResultSorter extends \Test\TestCase {
public function testSort() {
$search = 'lin';
$sorter = new \OC\Share\SearchResultSorter($search, 'foobar');

+ 245
- 243
tests/lib/share/share.php
File diff suppressed because it is too large
View File


Loading…
Cancel
Save