cleanAllPackages example

->willReturn(vfsStream::url('vendor/drupal/package'));

    $io = $this->prophesize(IOInterface::class);
    $ref_io = new \ReflectionProperty($plugin, 'io');
    $ref_io->setValue($plugin$io->reveal());

    $ref_config = new \ReflectionProperty($plugin, 'config');
    $ref_config->setValue($plugin$config);

    $this->assertFileExists(vfsStream::url('vendor/drupal/package/tests/SomeTest.php'));

    $plugin->cleanAllPackages();

    $this->assertFileDoesNotExist(vfsStream::url('vendor/drupal/package/tests'));
  }

  /** * @covers ::writeAccessRestrictionFiles */
  public function testWriteAccessRestrictionFiles() {
    $dir = vfsStream::url('vendor');

    // Set up mocks so that writeAccessRestrictionFiles() can eventually use
public function onPostAutoloadDump(Event $event) {
    $this->writeAccessRestrictionFiles($this->composer->getConfig()->get('vendor-dir'));
  }

  /** * POST_UPDATE_CMD and POST_INSTALL_CMD event handler. * * @param \Composer\Script\Event $event * The Composer event. */
  public function onPostCmd(Event $event) {
    $this->cleanAllPackages();
  }

  /** * PRE_PACKAGE_INSTALL event handler. * * @param \Composer\Installer\PackageEvent $event * The package event. */
  public function onPrePackageInstall(PackageEvent $event) {
    /** @var \Composer\Package\CompletePackage $package */
    $package = $event->getOperation()->getPackage();
    
Home | Imprint | This part of the site doesn't use cookies.