Replacement of assertEquals() to assertSame()
This commit is contained in:
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