copyContent() 공개 정적인 메소드

Copies content from $inputFile to $outputFile.
public static copyContent ( string $inputFile, string $outputFile, integer $bufferSize = 1024 )
$inputFile string
$outputFile string
$bufferSize integer
예제 #1
0
 /**
  * @test
  */
 public function shouldCopyFileContent()
 {
     //given
     StreamStub::register('logfile');
     StreamStub::$body = 'content';
     $tmpFileName = Path::joinWithTemp('test' . Clock::nowAsString('Y_m_d_H_i_s') . '.txt');
     //when
     Files::copyContent('logfile://input', $tmpFileName);
     //then
     $content = file_get_contents($tmpFileName);
     StreamStub::unregister();
     Files::delete($tmpFileName);
     $this->assertEquals('content', $content);
 }