|
|
|
|
|
|
|
|
use OC\Core\Controller\AutoCompleteController; |
|
|
use OC\Core\Controller\AutoCompleteController; |
|
|
use OCP\Collaboration\AutoComplete\IManager; |
|
|
use OCP\Collaboration\AutoComplete\IManager; |
|
|
use OCP\Collaboration\Collaborators\ISearch; |
|
|
use OCP\Collaboration\Collaborators\ISearch; |
|
|
|
|
|
use OCP\EventDispatcher\IEventDispatcher; |
|
|
use OCP\IRequest; |
|
|
use OCP\IRequest; |
|
|
use PHPUnit\Framework\MockObject\MockObject; |
|
|
use PHPUnit\Framework\MockObject\MockObject; |
|
|
use Symfony\Component\EventDispatcher\EventDispatcherInterface; |
|
|
|
|
|
use Test\TestCase; |
|
|
use Test\TestCase; |
|
|
|
|
|
|
|
|
class AutoCompleteControllerTest extends TestCase { |
|
|
class AutoCompleteControllerTest extends TestCase { |
|
|
|
|
|
|
|
|
protected $collaboratorSearch; |
|
|
protected $collaboratorSearch; |
|
|
/** @var IManager|MockObject */ |
|
|
/** @var IManager|MockObject */ |
|
|
protected $autoCompleteManager; |
|
|
protected $autoCompleteManager; |
|
|
/** @var EventDispatcherInterface|MockObject */ |
|
|
|
|
|
|
|
|
/** @var IEventDispatcher|MockObject */ |
|
|
protected $dispatcher; |
|
|
protected $dispatcher; |
|
|
/** @var AutoCompleteController */ |
|
|
/** @var AutoCompleteController */ |
|
|
protected $controller; |
|
|
protected $controller; |
|
|
|
|
|
|
|
|
$request = $this->createMock(IRequest::class); |
|
|
$request = $this->createMock(IRequest::class); |
|
|
$this->collaboratorSearch = $this->createMock(ISearch::class); |
|
|
$this->collaboratorSearch = $this->createMock(ISearch::class); |
|
|
$this->autoCompleteManager = $this->createMock(IManager::class); |
|
|
$this->autoCompleteManager = $this->createMock(IManager::class); |
|
|
$this->dispatcher = $this->createMock(EventDispatcherInterface::class); |
|
|
|
|
|
|
|
|
$this->dispatcher = $this->createMock(IEventDispatcher::class); |
|
|
|
|
|
|
|
|
$this->controller = new AutoCompleteController( |
|
|
$this->controller = new AutoCompleteController( |
|
|
'core', |
|
|
'core', |