Ejemplo n.º 1
0
 /**
  * The whole test.
  */
 public function test()
 {
     // All possible codes.
     $reflection = new \ReflectionClass('\\Jyxo\\Time\\ComposerException');
     foreach ($reflection->getConstants() as $code) {
         $exception = new ComposerException('Test', $code);
         $this->assertEquals($code, $exception->getCode());
     }
     // Non-existent code
     $exception = new ComposerException('Test', 'dummy-code');
     $this->assertEquals(ComposerException::UNKNOWN, $exception->getCode());
 }
 public function __construct($lockPath)
 {
     parent::__construct(sprintf('composer.lock file "%s" does not exist.', $lockPath));
 }
 public function __construct($lockPath)
 {
     parent::__construct(sprintf('composer.lock file "%s" is invalid.', $lockPath));
 }
Ejemplo n.º 4
0
 public function __construct($composerErrorOutput, $message = null, $code = 0, \Exception $previous = null)
 {
     parent::__construct($message, $code, $previous);
     $this->composerErrorOutput = $composerErrorOutput;
 }