Skip to content

Commit

Permalink
Fix User_Proxy tests as well
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <[email protected]>
  • Loading branch information
come-nc committed May 25, 2023
1 parent add59d2 commit 367b4fe
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion apps/user_ldap/tests/User_ProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
use OCA\User_LDAP\AccessFactory;
use OCA\User_LDAP\Helper;
use OCA\User_LDAP\ILDAPWrapper;
use OCA\User_LDAP\User\DeletedUsersIndex;
use OCA\User_LDAP\User_Proxy;
use OCA\User_LDAP\UserPluginManager;
use OCP\IConfig;
use OCP\IUserSession;
use OCP\Notification\IManager as INotificationManager;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Log\LoggerInterface;
use Test\TestCase;

class User_ProxyTest extends TestCase {
Expand All @@ -56,6 +58,10 @@ class User_ProxyTest extends TestCase {
private $proxy;
/** @var UserPluginManager|MockObject */
private $userPluginManager;
/** @var LoggerInterface|MockObject */
protected $logger;
/** @var DeletedUsersIndex|MockObject */
protected $deletedUsersIndex;

protected function setUp(): void {
parent::setUp();
Expand All @@ -67,6 +73,8 @@ protected function setUp(): void {
$this->notificationManager = $this->createMock(INotificationManager::class);
$this->userSession = $this->createMock(IUserSession::class);
$this->userPluginManager = $this->createMock(UserPluginManager::class);
$this->logger = $this->createMock(LoggerInterface::class);
$this->deletedUsersIndex = $this->createMock(DeletedUsersIndex::class);
$this->proxy = $this->getMockBuilder(User_Proxy::class)
->setConstructorArgs([
$this->helper,
Expand All @@ -75,7 +83,9 @@ protected function setUp(): void {
$this->config,
$this->notificationManager,
$this->userSession,
$this->userPluginManager
$this->userPluginManager,
$this->logger,
$this->deletedUsersIndex,
])
->setMethods(['handleRequest'])
->getMock();
Expand Down

0 comments on commit 367b4fe

Please sign in to comment.