Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/7476'
Browse files Browse the repository at this point in the history
  • Loading branch information
weierophinney committed May 4, 2015
2 parents d66e855 + 731eaf1 commit e440aa7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
10 changes: 5 additions & 5 deletions test/Compress/RarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,11 +265,11 @@ public function testRarCompressDirectory()

$base = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files'
. DIRECTORY_SEPARATOR . '_compress' . DIRECTORY_SEPARATOR . 'Compress' . DIRECTORY_SEPARATOR;
$this->assertTrue(file_exists($base));
$this->assertTrue(file_exists($base . 'zipextracted.txt'));
$this->assertTrue(file_exists($base . 'First' . DIRECTORY_SEPARATOR . 'zipextracted.txt'));
$this->assertTrue(file_exists($base . 'First' . DIRECTORY_SEPARATOR .
'Second' . DIRECTORY_SEPARATOR . 'zipextracted.txt'));
$this->assertFileExists($base);
$this->assertFileExists($base . 'zipextracted.txt');
$this->assertFileExists($base . 'First' . DIRECTORY_SEPARATOR . 'zipextracted.txt');
$this->assertFileExists($base . 'First' . DIRECTORY_SEPARATOR .
'Second' . DIRECTORY_SEPARATOR . 'zipextracted.txt');
$content = file_get_contents(dirname(__DIR__) . '/_files/Compress/zipextracted.txt');
$this->assertEquals('compress me', $content);
}
Expand Down
10 changes: 5 additions & 5 deletions test/Compress/ZipTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ public function testZipCompressDirectory()
. DIRECTORY_SEPARATOR, $content);

$base = $this->tmp . DIRECTORY_SEPARATOR . '_compress' . DIRECTORY_SEPARATOR . 'Compress' . DIRECTORY_SEPARATOR;
$this->assertTrue(file_exists($base));
$this->assertTrue(file_exists($base . 'zipextracted.txt'));
$this->assertTrue(file_exists($base . 'First' . DIRECTORY_SEPARATOR . 'zipextracted.txt'));
$this->assertTrue(file_exists($base . 'First' . DIRECTORY_SEPARATOR .
'Second' . DIRECTORY_SEPARATOR . 'zipextracted.txt'));
$this->assertFileExists($base);
$this->assertFileExists($base . 'zipextracted.txt');
$this->assertFileExists($base . 'First' . DIRECTORY_SEPARATOR . 'zipextracted.txt');
$this->assertFileExists($base . 'First' . DIRECTORY_SEPARATOR .
'Second' . DIRECTORY_SEPARATOR . 'zipextracted.txt');
$content = file_get_contents($this->tmp . '/Compress/zipextracted.txt');
$this->assertEquals('compress me', $content);
}
Expand Down
2 changes: 1 addition & 1 deletion test/CompressTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function testGetAdapter()
{
$filter = new CompressFilter('bz2');
$adapter = $filter->getAdapter();
$this->assertTrue($adapter instanceof \Zend\Filter\Compress\CompressionAlgorithmInterface);
$this->assertInstanceOf('Zend\Filter\Compress\CompressionAlgorithmInterface', $adapter);
$this->assertEquals('Bz2', $filter->getAdapterName());
}

Expand Down
2 changes: 1 addition & 1 deletion test/Encrypt/OpensslTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public function testMultipleOptionsAtInitiation()
'passphrase' => $passphrase,
'private' => __DIR__ . '/../_files/privatekey_pass.pem'));
$public = $filter->getPublicKey();
$this->assertFalse(empty($public));
$this->assertNotEmpty($public);
$this->assertEquals($passphrase, $filter->getPassphrase());
}

Expand Down
6 changes: 3 additions & 3 deletions test/HtmlEntitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public function testSetDoubleQuote()
public function testFluentInterface()
{
$instance = $this->_filter->setCharSet('UTF-8')->setQuoteStyle(ENT_QUOTES)->setDoubleQuote(false);
$this->assertTrue($instance instanceof HtmlEntitiesFilter);
$this->assertInstanceOf('Zend\Filter\HtmlEntities', $instance);
}

/**
Expand Down Expand Up @@ -209,7 +209,7 @@ public function testCorrectsForEncodingMismatch()
$result = $this->_filter->filter($string);
restore_error_handler();

$this->assertTrue(strlen($result) > 0);
$this->assertGreaterThan(0, strlen($result));
}

/**
Expand Down Expand Up @@ -251,7 +251,7 @@ public function testRaisesExceptionIfEncodingMismatchDetectedAndFinalStringIsEmp
$result = $this->_filter->filter($string);
$this->fail('Expected exception from single non-utf-8 character');
} catch (\Exception $e) {
$this->assertTrue($e instanceof Exception\DomainException);
$this->assertInstanceOf('Zend\Filter\Exception\DomainException', $e);
}
}

Expand Down
12 changes: 6 additions & 6 deletions test/InflectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function setUp()
public function testGetPluginManagerReturnsFilterManagerByDefault()
{
$broker = $this->inflector->getPluginManager();
$this->assertTrue($broker instanceof FilterPluginManager);
$this->assertInstanceOf('Zend\Filter\FilterPluginManager', $broker);
}

public function testSetPluginManagerAllowsSettingAlternatePluginManager()
Expand Down Expand Up @@ -91,7 +91,7 @@ public function testSetFilterRuleWithStringRuleCreatesRuleEntryAndFilterObject()
$rules = $this->inflector->getRules('controller');
$this->assertEquals(1, count($rules));
$filter = $rules[0];
$this->assertTrue($filter instanceof \Zend\Filter\FilterInterface);
$this->assertInstanceOf('Zend\Filter\FilterInterface', $filter);
}

public function testSetFilterRuleWithFilterObjectCreatesRuleEntryWithFilterObject()
Expand All @@ -103,7 +103,7 @@ public function testSetFilterRuleWithFilterObjectCreatesRuleEntryWithFilterObjec
$rules = $this->inflector->getRules('controller');
$this->assertEquals(1, count($rules));
$received = $rules[0];
$this->assertTrue($received instanceof \Zend\Filter\FilterInterface);
$this->assertInstanceOf('Zend\Filter\FilterInterface', $received);
$this->assertSame($filter, $received);
}

Expand All @@ -118,8 +118,8 @@ public function testAddFilterRuleAppendsRuleEntries()
$this->inflector->setFilterRule('controller', array('PregReplace', 'Alpha'));
$rules = $this->inflector->getRules('controller');
$this->assertEquals(2, count($rules));
$this->assertTrue($rules[0] instanceof \Zend\Filter\FilterInterface);
$this->assertTrue($rules[1] instanceof \Zend\Filter\FilterInterface);
$this->assertInstanceOf('Zend\Filter\FilterInterface', $rules[0]);
$this->assertInstanceOf('Zend\Filter\FilterInterface', $rules[1]);
}

public function testSetStaticRuleCreatesScalarRuleEntry()
Expand Down Expand Up @@ -200,7 +200,7 @@ public function testGetRule()
}

$this->inflector->setFilterRule(':controller', array('Alpha', 'StringToLower'));
$this->assertTrue($this->inflector->getRule('controller', 1) instanceof \Zend\Filter\StringToLower);
$this->assertInstanceOf('Zend\Filter\StringToLower', $this->inflector->getRule('controller', 1));
$this->assertFalse($this->inflector->getRule('controller', 2));
}

Expand Down
2 changes: 1 addition & 1 deletion test/PregReplaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function testPatternAccessorsWork()
public function testReplacementIsEmptyByDefault()
{
$replacement = $this->filter->getReplacement();
$this->assertTrue(empty($replacement));
$this->assertEmpty($replacement);
}

public function testReplacementAccessorsWork()
Expand Down
4 changes: 2 additions & 2 deletions test/StripTagsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ public function testFilterIsoChars()
$input = 'äöü<!-- a comment -->äöü';
$input = iconv("UTF-8", "ISO-8859-1", $input);
$output = $filter($input);
$this->assertFalse(empty($output));
$this->assertNotEmpty($output);
}

/**
Expand All @@ -457,7 +457,7 @@ public function testFilterIsoCharsInComment()
$input = 'äöü<!-- a comment -->äöü';
$input = iconv("UTF-8", "ISO-8859-1", $input);
$output = $filter($input);
$this->assertFalse(empty($output));
$this->assertNotEmpty($output);
}

/**
Expand Down

0 comments on commit e440aa7

Please sign in to comment.