Browse files

Merge branch 'patch-3' of https://github.com/gabriel403/zf2 into hotf…

…ix/2667
  • Loading branch information...
2 parents 0242a72 + 818d00a commit 55ab7023ef975461cfc74d5736a03231ae39f88a @weierophinney weierophinney committed Oct 4, 2012
Showing with 5 additions and 7 deletions.
  1. +5 −7 tests/ZendTest/Filter/Compress/RarTest.php
View
12 tests/ZendTest/Filter/Compress/RarTest.php
@@ -108,7 +108,7 @@ public function testBasicUsage()
. DIRECTORY_SEPARATOR . 'compressed.rar', $content);
$content = $filter->decompress($content);
- $this->assertEquals(dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR, $content);
+ $this->assertTrue($content);
$content = file_get_contents(dirname(__DIR__) . '/_files/zipextracted.txt');
$this->assertEquals('compress me', $content);
}
@@ -208,15 +208,15 @@ public function testSettingCallbackThrowsExceptionOnMissingCallback()
{
$filter = new RarCompression();
- $this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', 'must be between');
+ $this->setExpectedException('Zend\Filter\Exception\RuntimeException', 'No compression callback available');
$filter->compress('test.txt');
}
public function testSettingCallbackThrowsExceptionOnInvalidCallback()
{
$filter = new RarCompression();
- $this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', 'must be between');
+ $this->setExpectedException('Zend\Filter\Exception\InvalidArgumentException', 'Invalid callback provided');
$filter->setCallback('invalidCallback');
}
@@ -241,7 +241,7 @@ public function testRarCompressFile()
. DIRECTORY_SEPARATOR . 'compressed.rar', $content);
$content = $filter->decompress($content);
- $this->assertEquals(dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR, $content);
+ $this->assertTrue($content);
$content = file_get_contents(dirname(__DIR__) . '/_files/zipextracted.txt');
$this->assertEquals('compress me', $content);
}
@@ -266,9 +266,7 @@ public function testRarCompressDirectory()
mkdir(dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '_compress');
$content = $filter->decompress($content);
- $this->assertEquals(dirname(__DIR__)
- . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '_compress'
- . DIRECTORY_SEPARATOR, $content);
+ $this->assertTrue($content);
$base = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files'
. DIRECTORY_SEPARATOR . '_compress' . DIRECTORY_SEPARATOR . 'Compress' . DIRECTORY_SEPARATOR;

0 comments on commit 55ab702

Please sign in to comment.