write() public method

public write ( string $file, mixed $content )
$file string
$content mixed
Beispiel #1
0
 /**
  * Dumps the tapes on disk.
  */
 public function dump()
 {
     foreach ($this->tapes as $tape) {
         if ($tape->hasResponses()) {
             $fileName = 'record_' . $tape->getName() . '.json';
             $content = $this->formatter->encodeResponsesCollection($tape->getResponses());
             $this->writer->write($fileName, $content);
         }
     }
 }