Fix namespace in share/

This commit is contained in:
Joas Schilling 2016-05-19 09:15:10 +02:00
parent 68481c10e6
commit a107e7de7b
No known key found for this signature in database
GPG Key ID: 70A0B324C41C0946
5 changed files with 263 additions and 253 deletions

View File

@ -19,6 +19,8 @@
* *
*/ */
namespace Test\Share;
use OC\Share\MailNotifications; use OC\Share\MailNotifications;
use OCP\IL10N; use OCP\IL10N;
use OCP\IUser; use OCP\IUser;
@ -33,15 +35,15 @@ use OCP\IURLGenerator;
class MailNotificationsTest extends \Test\TestCase { class MailNotificationsTest extends \Test\TestCase {
/** @var IL10N */ /** @var IL10N */
private $l10n; private $l10n;
/** @var IMailer | PHPUnit_Framework_MockObject_MockObject */ /** @var IMailer | \PHPUnit_Framework_MockObject_MockObject */
private $mailer; private $mailer;
/** @var ILogger */ /** @var ILogger */
private $logger; private $logger;
/** @var Defaults | PHPUnit_Framework_MockObject_MockObject */ /** @var Defaults | \PHPUnit_Framework_MockObject_MockObject */
private $defaults; private $defaults;
/** @var IUser | PHPUnit_Framework_MockObject_MockObject */ /** @var IUser | \PHPUnit_Framework_MockObject_MockObject */
private $user; private $user;
/** @var IURLGenerator | PHPUnit_Framework_MockObject_MockObject */ /** @var IURLGenerator | \PHPUnit_Framework_MockObject_MockObject */
private $urlGenerator; private $urlGenerator;
@ -209,7 +211,7 @@ class MailNotificationsTest extends \Test\TestCase {
public function testSendInternalShareMail() { public function testSendInternalShareMail() {
$this->setupMailerMock('TestUser shared »welcome.txt« with you', ['recipient@owncloud.com' => 'Recipient'], false); $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'], [ $mailNotifications = $this->getMock('OC\Share\MailNotifications',['getItemSharedWithUser'], [
$this->user, $this->user,
$this->l10n, $this->l10n,
@ -286,7 +288,7 @@ class MailNotificationsTest extends \Test\TestCase {
->expects($this->once()) ->expects($this->once())
->method('send') ->method('send')
->with($message) ->with($message)
->will($this->throwException(new Exception('Some Exception Message'))); ->will($this->throwException(new \Exception('Some Exception Message')));
} }
} }
} }

View File

@ -19,7 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * 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_SOURCE = 0;
const FORMAT_TARGET = 1; const FORMAT_TARGET = 1;

View File

@ -19,11 +19,13 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/ */
namespace Test\Share;
/** /**
* @group DB * @group DB
* Class Test_Share_Helper * Class Helper
*/ */
class Test_Share_Helper extends \Test\TestCase { class Helper extends \Test\TestCase {
public function expireDateProvider() { public function expireDateProvider() {
return array( return array(

View File

@ -19,7 +19,9 @@
* License along with this library. If not, see <http://www.gnu.org/licenses/>. * 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() { public function testSort() {
$search = 'lin'; $search = 'lin';
$sorter = new \OC\Share\SearchResultSorter($search, 'foobar'); $sorter = new \OC\Share\SearchResultSorter($search, 'foobar');

File diff suppressed because it is too large Load Diff