XdebugHandlerMock.php 900 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Test\Mock;
  12. use Composer\XdebugHandler;
  13. class XdebugHandlerMock extends XdebugHandler
  14. {
  15. public $command;
  16. public $restarted;
  17. public function __construct(array $argv, $loaded)
  18. {
  19. parent::__construct($argv);
  20. $class = new \ReflectionClass(get_parent_class($this));
  21. $prop = $class->getProperty('loaded');
  22. $prop->setAccessible(true);
  23. $prop->setValue($this, $loaded);
  24. $this->command = '';
  25. $this->restarted = false;
  26. }
  27. protected function restart($command)
  28. {
  29. $this->command = $command;
  30. $this->restarted = true;
  31. }
  32. }