Skip to content

Commit

Permalink
Merge branch 'release-7.7.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Dec 19, 2022
2 parents c52fe71 + 6d704db commit 1918774
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
7 changes: 5 additions & 2 deletions test/unit/model/DataBaseAccessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@

use common_persistence_SqlPersistence;
use core_kernel_classes_Resource;
use oat\generis\test\TestCase;
use oat\generis\test\ServiceManagerMockTrait;
use PHPUnit\Framework\TestCase;
use oat\oatbox\event\EventManager;
use oat\taoDacSimple\model\DataBaseAccess;
use oat\taoDacSimple\model\event\DacAddedEvent;
Expand All @@ -42,6 +43,8 @@
*/
class DataBaseAccessTest extends TestCase
{
use ServiceManagerMockTrait;

private const INSERT_CHUNK_SIZE = 1;

/** @var DataBaseAccess */
Expand All @@ -62,7 +65,7 @@ public function setUp(): void
$this->sut->setLogger(new NullLogger());
$this->sut->setInsertChunkSize(self::INSERT_CHUNK_SIZE);
$this->sut->setServiceLocator(
$this->getServiceLocatorMock(
$this->getServiceManagerMock(
[
EventManager::SERVICE_ID => $this->eventManager
]
Expand Down
8 changes: 6 additions & 2 deletions test/unit/model/PermissionProviderTest.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
Expand All @@ -22,13 +23,16 @@

namespace oat\taoDacSimple\test\unit\model;

use oat\generis\test\TestCase;
use oat\generis\test\ServiceManagerMockTrait;
use PHPUnit\Framework\TestCase;
use oat\taoDacSimple\model\DataBaseAccess;
use oat\taoDacSimple\model\PermissionProvider;
use oat\taoDacSimple\model\RolePrivilegeRetriever;

class PermissionProviderTest extends TestCase
{
use ServiceManagerMockTrait;

/** @var PermissionProvider */
private $sut;

Expand All @@ -38,7 +42,7 @@ class PermissionProviderTest extends TestCase
public function setUp(): void
{
$this->userPrivilegeRetriever = $this->createMock(RolePrivilegeRetriever::class);
$serviceLocator = $this->getServiceLocatorMock(
$serviceLocator = $this->getServiceManagerMock(
[
DataBaseAccess::SERVICE_ID => $this->createMock(DataBaseAccess::class),
RolePrivilegeRetriever::class => $this->userPrivilegeRetriever,
Expand Down
7 changes: 5 additions & 2 deletions test/unit/model/RolePrivilegeRetrieverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,15 @@

namespace oat\taoDacSimple\test\unit\model;

use oat\generis\test\TestCase;
use oat\generis\test\ServiceManagerMockTrait;
use PHPUnit\Framework\TestCase;
use oat\taoDacSimple\model\DataBaseAccess;
use oat\taoDacSimple\model\RolePrivilegeRetriever;

class RolePrivilegeRetrieverTest extends TestCase
{
use ServiceManagerMockTrait;

/** @var RolePrivilegeRetriever */
private $sut;

Expand All @@ -41,7 +44,7 @@ public function setUp(): void

$this->sut = new RolePrivilegeRetriever();
$this->sut->setServiceLocator(
$this->getServiceLocatorMock(
$this->getServiceManagerMock(
[
DataBaseAccess::SERVICE_ID => $this->databaseAccess
]
Expand Down
7 changes: 5 additions & 2 deletions test/unit/model/eventHandler/ResourceUpdateHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
use core_kernel_classes_Class;
use core_kernel_classes_Resource;
use oat\generis\test\MockObject;
use oat\generis\test\TestCase;
use oat\generis\test\ServiceManagerMockTrait;
use PHPUnit\Framework\TestCase;
use oat\tao\model\event\ResourceMovedEvent;
use oat\taoDacSimple\model\eventHandler\ResourceUpdateHandler;
use oat\taoDacSimple\model\PermissionsService;
Expand All @@ -34,6 +35,8 @@

class ResourceUpdateHandlerTest extends TestCase
{
use ServiceManagerMockTrait;

/** @var RolePrivilegeRetriever|MockObject */
private $rolePrivilegeRetriever;

Expand Down Expand Up @@ -70,7 +73,7 @@ public function setUp(): void

$this->subject = new ResourceUpdateHandler();
$this->subject->setServiceLocator(
$this->getServiceLocatorMock(
$this->getServiceManagerMock(
[
RolePrivilegeRetriever::class => $this->rolePrivilegeRetriever,
PermissionsServiceFactory::class => $this->permissionsServiceFactory
Expand Down

0 comments on commit 1918774

Please sign in to comment.