Replacement of assertEquals() to assertSame()

This commit is contained in:
Vyacheslav Agafonov
2011-12-02 17:22:31 +04:00
parent 3a79d203c7
commit 0fdcb87653
35 changed files with 214 additions and 214 deletions

View File

@ -89,7 +89,7 @@ class DbStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnCallback(array($this, 'driverQuote')));
$result = $this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
$this->assertEquals('SELECT * place_val FROM place_val AND new_val', $result);
$this->assertSame('SELECT * place_val FROM place_val AND new_val', $result);
}
public function testExecuteNoPlaceholders()
@ -102,7 +102,7 @@ class DbStatementTest extends PHPUnit_Framework_TestCase
->with($this->anything())
->will($this->returnCallback(array($this, 'dbStatementAssemble')));
$result = $this->stmt->execute(array());
$this->assertEquals('PLAIN SQL', $result);
$this->assertSame('PLAIN SQL', $result);
}
public function testFetch()
@ -113,20 +113,20 @@ class DbStatementTest extends PHPUnit_Framework_TestCase
->with($this->anything())
->will($this->returnCallback(array($this, 'dbStatementFetch')));
$this->assertEquals(11, $this->stmt->fetchField('one'));
$this->assertSame(11, $this->stmt->fetchField('one'));
$this->assertFalse($this->stmt->fetchField('zero'));
reset($this->testData);
$this->assertEquals(array(11, 21, 31), $this->stmt->fetchColumn('one'));
$this->assertSame(array(11, 21, 31), $this->stmt->fetchColumn('one'));
reset($this->testData);
$result = $this->stmt->fetchAll();
$this->assertEquals(11, $result[0]->one);
$this->assertEquals(32, $result[2]->two);
$this->assertSame(11, $result[0]->one);
$this->assertSame(32, $result[2]->two);
reset($this->testData);
$result = $this->stmt->fetchPairs();
$this->assertEquals(31, $result['one']);
$this->assertSame(31, $result['one']);
}
public function dbStatementAssemble($val)