Development

Changeset 20974

You must first sign up to be able to contribute.

Changeset 20974

Show
Ignore:
Timestamp:
08/09/09 20:34:05 (5 years ago)
Author:
bschussek
Message:

Fixed: LimeOutputPipe? does not throw an exception anymore if output cannot be read, but generates a warning instead

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tools/lime/branches/2.0-experimental/lib/output/LimeOutputPipe.php

    r20968 r20974  
    3535    if (!empty($this->buffer)) 
    3636    { 
    37       throw new RuntimeException(sprintf('Could not unserialize "%s"', $this->buffer)); 
     37      $this->output->warning("Could not parse test output. Make sure you don't echo any additional data.", $file, 1); 
    3838    } 
    3939  } 
  • tools/lime/branches/2.0-experimental/test/unit/output/LimeOutputPipeTest.php

    r20968 r20974  
    167167 
    168168 
    169 // @Test: If the output cannot be unserialized, an exception is thrown 
     169// @Test: If the output cannot be unserialized, an error is reported 
    170170 
    171171  // fixtures 
    172172  file_put_contents($file, '<?php echo "Some Error occurred";'); 
    173   // test 
    174   $t->expect('RuntimeException'); 
    175   $connector->connect($file); 
     173  $output->warning("Could not parse test output. Make sure you don't echo any additional data.", $file, 1); 
     174  $output->replay(); 
     175  // test 
     176  $connector->connect($file); 
     177  // assertions 
     178  $output->verify(); 
    176179 
    177180