Skip to content
Snippets Groups Projects

Issue #3246673: Move PendingUpdatesValidator into Package Manager

1 unresolved thread
1 unresolved thread
4 files
+ 49
66
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -3,7 +3,6 @@
@@ -3,7 +3,6 @@
namespace Drupal\Tests\package_manager\Kernel;
namespace Drupal\Tests\package_manager\Kernel;
use Drupal\KernelTests\KernelTestBase;
use Drupal\KernelTests\KernelTestBase;
use Drupal\package_manager\Event\PreCreateEvent;
use Drupal\package_manager\EventSubscriber\ComposerExecutableValidator;
use Drupal\package_manager\EventSubscriber\ComposerExecutableValidator;
use Drupal\package_manager\ValidationResult;
use Drupal\package_manager\ValidationResult;
use Drupal\Tests\package_manager\Traits\ValidationTestTrait;
use Drupal\Tests\package_manager\Traits\ValidationTestTrait;
@@ -16,29 +15,7 @@ use Prophecy\Argument;
@@ -16,29 +15,7 @@ use Prophecy\Argument;
*
*
* @group package_manager
* @group package_manager
*/
*/
class ComposerExecutableValidatorTest extends KernelTestBase {
class ComposerExecutableValidatorTest extends PackageManagerKernelTestBase {
use ValidationTestTrait;
/**
* {@inheritdoc}
*/
protected static $modules = ['package_manager'];
/**
* Runs the validator under test, and asserts its results match expectations.
*
* @param \Drupal\package_manager\ValidationResult[] $expected_results
* The expected validation results.
*/
private function assertResults(array $expected_results): void {
$stage = $this->prophesize('\Drupal\package_manager\Stage');
$event = new PreCreateEvent($stage->reveal());
$this->container->get('package_manager.validator.composer_executable')
->validateStage($event);
$this->assertValidationResultsEqual($expected_results, $event->getResults());
}
/**
/**
* Tests that an error is raised if the Composer executable isn't found.
* Tests that an error is raised if the Composer executable isn't found.
Loading