From 88139326ea9bd4b77b7f6e71bca056b267ee96b5 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Fri, 1 May 2015 11:50:51 +0200 Subject: [PATCH 1/2] [test] Replace assertFalse(is_FOO) with assertNotInternalType('FOO') --- test/Storage/Adapter/RedisTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Storage/Adapter/RedisTest.php b/test/Storage/Adapter/RedisTest.php index 632e4ddf0..01e988700 100644 --- a/test/Storage/Adapter/RedisTest.php +++ b/test/Storage/Adapter/RedisTest.php @@ -213,7 +213,7 @@ public function testGetSetLibOptionsOnExistingRedisResourceInstance() $this->_options->setLibOptions($options); $this->_storage->setItem($key, $value); //should not serialize array correctly - $this->assertFalse(is_array($this->_storage->getItem($key)), 'Redis should not serialize automatically anymore, lib options were not set correctly'); + $this->assertNotInternalType('array', $this->_storage->getItem($key), 'Redis should not serialize automatically anymore, lib options were not set correctly'); } public function testGetSetLibOptionsWithCleanRedisResourceInstance() @@ -233,7 +233,7 @@ public function testGetSetLibOptionsWithCleanRedisResourceInstance() $this->_options->setLibOptions($options); $redis->setItem($key, $value); //should not serialize array correctly - $this->assertFalse(is_array($redis->getItem($key)), 'Redis should not serialize automatically anymore, lib options were not set correctly'); + $this->assertNotInternalType('array', $redis->getItem($key), 'Redis should not serialize automatically anymore, lib options were not set correctly'); } /* RedisOptions */ From d6de4c12c91ddd570cdec0835596a55c5ce8f660 Mon Sep 17 00:00:00 2001 From: Maks3w Date: Fri, 1 May 2015 10:05:06 +0200 Subject: [PATCH 2/2] [test] Replace assertTrue(file_exists) with assertFileExists --- test/Pattern/CaptureCacheTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/Pattern/CaptureCacheTest.php b/test/Pattern/CaptureCacheTest.php index faa1d31cb..b94760699 100644 --- a/test/Pattern/CaptureCacheTest.php +++ b/test/Pattern/CaptureCacheTest.php @@ -92,7 +92,7 @@ public function testSetThrowsLogicExceptionOnMissingPublicDir() public function testSetWithNormalPageId() { $this->_pattern->set('content', '/dir1/dir2/file'); - $this->assertTrue(file_exists($this->_tmpCacheDir . '/dir1/dir2/file')); + $this->assertFileExists($this->_tmpCacheDir . '/dir1/dir2/file'); $this->assertSame(file_get_contents($this->_tmpCacheDir . '/dir1/dir2/file'), 'content'); } @@ -101,7 +101,7 @@ public function testSetWithIndexFilename() $this->_options->setIndexFilename('test.html'); $this->_pattern->set('content', '/dir1/dir2/'); - $this->assertTrue(file_exists($this->_tmpCacheDir . '/dir1/dir2/test.html')); + $this->assertFileExists($this->_tmpCacheDir . '/dir1/dir2/test.html'); $this->assertSame(file_get_contents($this->_tmpCacheDir . '/dir1/dir2/test.html'), 'content'); }