summaryrefslogtreecommitdiffstats
path: root/tests/lib/notification/managertest.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-09-08 08:57:29 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-09-08 09:01:02 +0200
commit38001d824b142ca9c47f2afafce91ab8b76f1a9a (patch)
treef1abdf50c42874a1ef847ead0fe9d89c2446451f /tests/lib/notification/managertest.php
parent59f37a8dfbc27242bb0ad50731f8ae20b1ad938c (diff)
downloadnextcloud-server-38001d824b142ca9c47f2afafce91ab8b76f1a9a.tar.gz
nextcloud-server-38001d824b142ca9c47f2afafce91ab8b76f1a9a.zip
Move interfaces to private until they are no longer experimental
Diffstat (limited to 'tests/lib/notification/managertest.php')
-rw-r--r--tests/lib/notification/managertest.php88
1 files changed, 44 insertions, 44 deletions
diff --git a/tests/lib/notification/managertest.php b/tests/lib/notification/managertest.php
index 13ac4b80b84..fa2a0586f90 100644
--- a/tests/lib/notification/managertest.php
+++ b/tests/lib/notification/managertest.php
@@ -22,7 +22,7 @@
namespace Test\Notification;
use OC\Notification\Manager;
-use OCP\Notification\IManager;
+use OC\Notification\IManager;
use Test\TestCase;
class ManagerTest extends TestCase {
@@ -35,7 +35,7 @@ class ManagerTest extends TestCase {
}
public function testRegisterApp() {
- $app = $this->getMockBuilder('OCP\Notification\IApp')
+ $app = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
@@ -59,7 +59,7 @@ class ManagerTest extends TestCase {
* @expectedException \InvalidArgumentException
*/
public function testRegisterAppInvalid() {
- $notifier = $this->getMockBuilder('OCP\Notification\INotifier')
+ $notifier = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
@@ -73,7 +73,7 @@ class ManagerTest extends TestCase {
}
public function testRegisterNotifier() {
- $notifier = $this->getMockBuilder('OCP\Notification\INotifier')
+ $notifier = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
@@ -97,7 +97,7 @@ class ManagerTest extends TestCase {
* @expectedException \InvalidArgumentException
*/
public function testRegisterNotifierInvalid() {
- $app = $this->getMockBuilder('OCP\Notification\IApp')
+ $app = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
@@ -112,28 +112,28 @@ class ManagerTest extends TestCase {
public function testCreateNotification() {
$action = $this->manager->createNotification();
- $this->assertInstanceOf('OCP\Notification\INotification', $action);
+ $this->assertInstanceOf('OC\Notification\INotification', $action);
}
public function testNotify() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
->method('isValid')
->willReturn(true);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
- $app = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
+ $app = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app->expects($this->once())
->method('notify')
->with($notification);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
- $app2 = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
+ $app2 = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app2->expects($this->once())
@@ -154,8 +154,8 @@ class ManagerTest extends TestCase {
* @expectedException \InvalidArgumentException
*/
public function testNotifyInvalid() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
@@ -166,23 +166,23 @@ class ManagerTest extends TestCase {
}
public function testPrepare() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
->method('isValidParsed')
->willReturn(true);
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification2 */
- $notification2 = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification2 */
+ $notification2 = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification2->expects($this->exactly(2))
->method('isValidParsed')
->willReturn(true);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
- $notifier = $this->getMockBuilder('OCP\Notification\INotifier')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
+ $notifier = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
$notifier->expects($this->once())
@@ -190,8 +190,8 @@ class ManagerTest extends TestCase {
->with($notification, 'en')
->willReturnArgument(0);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier2 */
- $notifier2 = $this->getMockBuilder('OCP\Notification\INotifier')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier2 */
+ $notifier2 = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
$notifier2->expects($this->once())
@@ -213,16 +213,16 @@ class ManagerTest extends TestCase {
* @expectedException \InvalidArgumentException
*/
public function testPrepareInvalid() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
->method('isValidParsed')
->willReturn(false);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
- $notifier = $this->getMockBuilder('OCP\Notification\INotifier')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
+ $notifier = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
$notifier->expects($this->once())
@@ -238,16 +238,16 @@ class ManagerTest extends TestCase {
}
public function testPrepareNotifierThrows() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
->method('isValidParsed')
->willReturn(true);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
- $notifier = $this->getMockBuilder('OCP\Notification\INotifier')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $notifier */
+ $notifier = $this->getMockBuilder('OC\Notification\INotifier')
->disableOriginalConstructor()
->getMock();
$notifier->expects($this->once())
@@ -266,8 +266,8 @@ class ManagerTest extends TestCase {
* @expectedException \InvalidArgumentException
*/
public function testPrepareNoNotifier() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
$notification->expects($this->once())
@@ -278,21 +278,21 @@ class ManagerTest extends TestCase {
}
public function testMarkProcessed() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
- $app = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
+ $app = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app->expects($this->once())
->method('markProcessed')
->with($notification);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
- $app2 = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
+ $app2 = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app2->expects($this->once())
@@ -310,13 +310,13 @@ class ManagerTest extends TestCase {
}
public function testGetCount() {
- /** @var \OCP\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
- $notification = $this->getMockBuilder('OCP\Notification\INotification')
+ /** @var \OC\Notification\INotification|\PHPUnit_Framework_MockObject_MockObject $notification */
+ $notification = $this->getMockBuilder('OC\Notification\INotification')
->disableOriginalConstructor()
->getMock();
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
- $app = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app */
+ $app = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app->expects($this->once())
@@ -324,8 +324,8 @@ class ManagerTest extends TestCase {
->with($notification)
->willReturn(21);
- /** @var \OCP\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
- $app2 = $this->getMockBuilder('OCP\Notification\IApp')
+ /** @var \OC\Notification\IApp|\PHPUnit_Framework_MockObject_MockObject $app2 */
+ $app2 = $this->getMockBuilder('OC\Notification\IApp')
->disableOriginalConstructor()
->getMock();
$app2->expects($this->once())