XdebugHandlerMock.php 960 B

12345678910111213141516171819202122232425262728293031323334353637383940
  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\Factory;
  13. use Composer\XdebugHandler;
  14. class XdebugHandlerMock extends XdebugHandler
  15. {
  16. public $restarted;
  17. public $output;
  18. public function __construct($loaded = null)
  19. {
  20. $this->output = Factory::createOutput();
  21. parent::__construct($this->output);
  22. $loaded = null === $loaded ? true: $loaded;
  23. $class = new \ReflectionClass(get_parent_class($this));
  24. $prop = $class->getProperty('loaded');
  25. $prop->setAccessible(true);
  26. $prop->setValue($this, $loaded);
  27. $this->restarted = false;
  28. }
  29. protected function restart($command)
  30. {
  31. $this->restarted = true;
  32. }
  33. }