Skip to content

Commit

Permalink
Added Progress tests for saveToTemp
Browse files Browse the repository at this point in the history
  • Loading branch information
tedivm committed Jul 8, 2014
1 parent a8b5823 commit 5ac717d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/Current/Test/ReleaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,22 @@ public function testSaveToTemp()

$this->assertFileExists($tmpFile);
$this->assertEquals('fa3841ac76b7356c01d50825ce9b1b7885b0adcb', sha1_file($tmpFile));

$progress = $this->getMock('\\Current\\Interfaces\\Progress', array('setFileProgress', 'setFileComplete'));

$progress->expects($this->atLeastOnce())
->method('setFileProgress')
->with($this->greaterThanOrEqual(0));

$progress->expects($this->once())
->method('setFileComplete');

$developmentRelease = $this->testConstruct(false);
$tmpFile = $developmentRelease->saveToTemp('phar', $progress);
static::$files[] = $tmpFile;

$this->assertFileExists($tmpFile);
$this->assertEquals('9af77837e7632e18fc4431ab4b0a71de5baf4165', sha1_file($tmpFile));
}

protected function tearDown()
Expand Down

0 comments on commit 5ac717d

Please sign in to comment.