Replacement of assertEquals() to assertSame()
This commit is contained in:
4
tests/cache/CacheKeyTest.php
vendored
4
tests/cache/CacheKeyTest.php
vendored
@ -49,7 +49,7 @@ class CacheKeyTest extends PHPUnit_Framework_TestCase
|
||||
$getExpireMethod = new ReflectionMethod('CacheKey', 'getExpire');
|
||||
$getExpireMethod->setAccessible(TRUE);
|
||||
|
||||
$this->assertEquals(100, $getExpireMethod->invoke($this->cache));
|
||||
$this->assertSame(100, $getExpireMethod->invoke($this->cache));
|
||||
}
|
||||
|
||||
public function testGetSet()
|
||||
@ -66,7 +66,7 @@ class CacheKeyTest extends PHPUnit_Framework_TestCase
|
||||
|
||||
$this->cache = new CacheKey($mockCacher, 'any');
|
||||
$this->cache->set('some');
|
||||
$this->assertEquals('some', $this->cache->get());
|
||||
$this->assertSame('some', $this->cache->get());
|
||||
}
|
||||
|
||||
public function testDel()
|
||||
|
14
tests/cache/MemcacheCacheTest.php
vendored
14
tests/cache/MemcacheCacheTest.php
vendored
@ -47,7 +47,7 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$memcache = new MemcacheCache(array());
|
||||
$this->assertTrue($memcache->add('key', 'value'));
|
||||
$this->assertEquals('value', $memcache->get('key'));
|
||||
$this->assertSame('value', $memcache->get('key'));
|
||||
$this->assertFalse($memcache->add('key', 'newvalue'));
|
||||
}
|
||||
|
||||
@ -60,9 +60,9 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
||||
$memcache->add('three', 'three');
|
||||
|
||||
$this->assertTrue($memcache->increment('one'));
|
||||
$this->assertEquals(2, $memcache->get('one'));
|
||||
$this->assertSame(2, $memcache->get('one'));
|
||||
$this->assertTrue($memcache->decrement('two'));
|
||||
$this->assertEquals(1, $memcache->get('two'));
|
||||
$this->assertSame(1, $memcache->get('two'));
|
||||
|
||||
$this->assertFalse($memcache->decrement('three'));
|
||||
}
|
||||
@ -75,7 +75,7 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
||||
$memcache->add('two', 2);
|
||||
|
||||
$memcache->del('one');
|
||||
$this->assertEquals(2, $memcache->get('two'));
|
||||
$this->assertSame(2, $memcache->get('two'));
|
||||
$this->assertFalse($memcache->get('one'));
|
||||
}
|
||||
|
||||
@ -87,7 +87,7 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
||||
$memcache->add('two', 2);
|
||||
$memcache->add('three', 'three');
|
||||
|
||||
$this->assertEquals('three', 'three');
|
||||
$this->assertSame('three', 'three');
|
||||
|
||||
$memcache->flush();
|
||||
|
||||
@ -105,8 +105,8 @@ class MemcacheCacheTest extends PHPUnit_Framework_TestCase
|
||||
$memcache->set('one', 30);
|
||||
$memcache->replace('three', 3);
|
||||
|
||||
$this->assertEquals(30, $memcache->get('one'));
|
||||
$this->assertEquals(3, $memcache->get('three'));
|
||||
$this->assertSame(30, $memcache->get('one'));
|
||||
$this->assertSame(3, $memcache->get('three'));
|
||||
}
|
||||
|
||||
protected function newCallback($className)
|
||||
|
Reference in New Issue
Block a user