You are here

function ResourceStreamCrossingTestCase::testCopyAtoB in D7 Media 6

File

resource/tests/ResourceStream.test, line 215
This provides SimpleTests for the core stream wrapper functionality.

Class

ResourceStreamCrossingTestCase

Code

function testCopyAtoB() {
  $this
    ->assertTrue(file_put_contents($this->urlA, $this->data), "file_put_contents({$this->urlA}, {$this->data})");
  $this
    ->assertTrue(copy($this->urlA, $this->urlB), "copy({$this->urlA}, {$this->urlB})");
  $this
    ->assertTrue($this->data == file_get_contents($this->urlB), "Verify content of {$this->urlA} matches {$this->urlB}({$this->data})");
  unlink($this->urlA);
  unlink($this->urlB);
}