test: refactor deprecated tests
This commit is contained in:
Родитель
675cc93de1
Коммит
fdecae19e9
|
@ -4,7 +4,6 @@ namespace OCA\OJSXC;
|
|||
|
||||
use OCA\OJSXC\Db\Message;
|
||||
use OCA\OJSXC\Db\Stanza;
|
||||
//use PHPUnit_Framework_TestCase;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class NewContentContainerTest extends TestCase
|
||||
|
|
|
@ -5,7 +5,6 @@ namespace OCA\OJSXC\Http {
|
|||
use OCA\OJSXC\Db\Message;
|
||||
use OCA\OJSXC\Db\Stanza;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
|
||||
class XMPPResponseTest extends TestCase
|
||||
{
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace OCA\OJSXC\StanzaHandlers;
|
||||
namespace OCA\OJSXC\Tests\Unit\StanzaHandlers;
|
||||
|
||||
use OCA\OJSXC\Db\IQRoster;
|
||||
use OCA\OJSXC\Exceptions\TerminateException;
|
||||
use OCA\OJSXC\IUserProvider;
|
||||
use OCA\OJSXC\StanzaHandlers\IQ;
|
||||
use OCA\OJSXC\User;
|
||||
use OCP\IConfig;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use OCP\IUserManager;
|
||||
use PHPUnit_Framework_MockObject_MockObject;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
|
||||
class IQTest extends TestCase
|
||||
{
|
||||
|
@ -50,9 +50,10 @@ class IQTest extends TestCase
|
|||
{
|
||||
$this->host = 'localhost';
|
||||
$this->userId = 'john';
|
||||
$this->userManager = $this->getMockBuilder('OCP\IUserManager')->disableOriginalConstructor()->getMock();
|
||||
$this->config = $this->getMockBuilder('OCP\IConfig')->disableOriginalConstructor()->getMock();
|
||||
$this->userProvider = $this->getMockBuilder('OCA\OJSXC\IUserProvider')->disableOriginalConstructor()->getMock();
|
||||
$this->userManager = $this->getMockBuilder(IUserManager::class)->getMock();
|
||||
$this->config = $this->getMockBuilder(IConfig::class)->getMock();
|
||||
$this->userProvider = $this->getMockBuilder(IUserProvider::class)->getMock();
|
||||
|
||||
$this->iq = new IQ($this->userId, $this->host, $this->userManager, $this->config, $this->userProvider);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@ use PHPUnit\Framework\TestCase;
|
|||
use OCA\OJSXC\Db\MessageMapper;
|
||||
use OCA\OJSXC\IUserProvider;
|
||||
use OCP\ILogger;
|
||||
use PHPUnit_Framework_TestCase;
|
||||
use PHPUnit_Framework_MockObject_MockObject;
|
||||
|
||||
class MessageTest extends TestCase
|
||||
|
|
Загрузка…
Ссылка в новой задаче