Skip to content
Snippets Groups Projects
Commit 6e5f07e3 authored by Alexey Korepov's avatar Alexey Korepov
Browse files

Fix failing test on Drupal 10.1

parent 1cea7318
No related branches found
Tags 1.0.0
No related merge requests found
......@@ -3,10 +3,9 @@
namespace Drupal\Tests\test_helpers\Unit\TestHelpersApi;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\dblog\Plugin\rest\resource\DBLogResource;
use Drupal\media\Plugin\Derivative\DynamicLocalTasks;
use Drupal\Tests\UnitTestCase;
use Drupal\test_helpers\TestHelpers;
use Psr\Log\LoggerInterface;
use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException;
use Drupal\Core\Entity\Controller\EntityController;
use Drupal\Core\Entity\EntityTypeInterface;
......@@ -203,24 +202,17 @@ class ServicesTest extends UnitTestCase {
* @covers ::createClass
*/
public function testCreateClass() {
$configuration = [];
$plugin_id = 'my_plugin';
$plugin_definition = [];
$serializer_formats = [];
$logger = $this->createMock(LoggerInterface::class);
TestHelpers::getContainer()->setParameter('serializer.formats', []);
TestHelpers::setServices([
'string_translation',
'entity_type.manager',
]);
$class = TestHelpers::createClass(
DBLogResource::class,
[
$configuration,
$plugin_id,
$plugin_definition,
$serializer_formats,
$logger,
DynamicLocalTasks::class,
['plugin_id',
],
['logger.factory']);
['config.factory']);
$this->assertInstanceOf(DBLogResource::class, $class);
$this->assertInstanceOf(DynamicLocalTasks::class, $class);
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment