Skip to content
Snippets Groups Projects
Commit 233f6f6a authored by Tim Plunkett's avatar Tim Plunkett
Browse files

Issue #3375619 by tim.plunkett, chrisfromredfin: Fix test fails from upstream TUF changes

parent 1234a873
No related branches found
No related tags found
1 merge request!395Issue #3375619: Fix test fails from upstream TUF changes
......@@ -19,7 +19,7 @@ use Drupal\package_manager\PathLocator;
use Drupal\project_browser\ComposerInstaller\Installer;
use Drupal\project_browser\ComposerInstaller\Validator\CoreNotUpdatedValidator;
use Drupal\project_browser\ComposerInstaller\Validator\PackageNotInstalledValidator;
use PhpTuf\ComposerStager\Infrastructure\Factory\Path\PathFactoryInterface;
use PhpTuf\ComposerStager\API\Path\Factory\PathFactoryInterface;
use Symfony\Component\DependencyInjection\Reference;
class ProjectBrowserServiceProvider extends ServiceProviderBase {
......
......@@ -12,7 +12,8 @@ use Drupal\package_manager_bypass\LoggingCommitter;
use Drupal\package_manager_test_validation\EventSubscriber\TestSubscriber;
use Drupal\Tests\package_manager\Kernel\PackageManagerKernelTestBase;
use Drupal\Tests\user\Traits\UserCreationTrait;
use PhpTuf\ComposerStager\Domain\Exception\InvalidArgumentException;
use PhpTuf\ComposerStager\API\Exception\InvalidArgumentException;
use PhpTuf\ComposerStager\Internal\Translation\Value\TranslatableMessage;
/**
* @coversDefaultClass \Drupal\project_browser\ComposerInstaller\Installer
......@@ -85,7 +86,7 @@ class InstallerTest extends PackageManagerKernelTestBase {
$installer = $this->container->get('project_browser.installer');
$installer->create();
$installer->require(['org/package-name']);
$thrown_message = 'A very bad thing happened';
$thrown_message = new TranslatableMessage('A very bad thing happened');
LoggingCommitter::setException(new $thrown_class($thrown_message, 123));
$this->expectException($expected_class);
$expected_message = $expected_class === ApplyFailedException::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