tests passing
This commit is contained in:
parent
107d0d6a8c
commit
b000e9414b
@ -9,14 +9,14 @@ use Drupal\Core\Entity\EntityTypeManagerInterface;
|
|||||||
|
|
||||||
class Utils {
|
class Utils {
|
||||||
|
|
||||||
public function __construct(
|
// public function __construct(
|
||||||
EntityTypeManager $entityTypeManager = null
|
// EntityTypeManager $entityTypeManager = null
|
||||||
) {
|
// ) {
|
||||||
if ($entityTypeManager == null) {
|
// if ($entityTypeManager == null) {
|
||||||
$entityTypeManager = Drupal::entityTypeManager();
|
// $entityTypeManager = Drupal::entityTypeManager();
|
||||||
}
|
// }
|
||||||
$this->entityTypeManager = $entityTypeManager;
|
// $this->entityTypeManager = $entityTypeManager;
|
||||||
}
|
// }
|
||||||
|
|
||||||
public function addConditionsToQuery(QueryInterface $query, array $conditions): void {
|
public function addConditionsToQuery(QueryInterface $query, array $conditions): void {
|
||||||
foreach($conditions as $condition) {
|
foreach($conditions as $condition) {
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
<?php declare(strict_types = 1);
|
|
||||||
|
|
||||||
namespace Drupal\Tests\opencase\Unit;
|
|
||||||
|
|
||||||
use Drupal\Tests\UnitTestCase;
|
|
||||||
use Drupal\opencase\Utils;
|
|
||||||
|
|
||||||
class UtilsTest extends UnitTestCase{
|
|
||||||
public function setUp(): void {
|
|
||||||
/** @var \Drupal\core\Entity\EntityTypeManager&\PHPUnit\Framework\MockObject\MockObject $entityTypeManager */
|
|
||||||
$this->entityTypeManager = $this->getMockBuilder('\\Drupal\\Core\\Entity\\EntityTypeManager')->disableOriginalConstructor()->getMock();
|
|
||||||
$this->utils = new Utils($this->entityTypeManager);
|
|
||||||
}
|
|
||||||
}
|
|
Reference in New Issue
Block a user