modified classes for GeneralException thrown

This commit is contained in:
Anton Grebnev
2011-12-06 14:05:18 +04:00
parent 47b5843ef6
commit 71cc211c4f
9 changed files with 51 additions and 26 deletions

View File

@ -63,7 +63,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage Placeholder must be an array or string
* @TODO: change Exception Message 'Placeholder must be an array or string' - no arrays available
*/
@ -74,7 +74,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException Exception
* @expectedException GeneralException
* @expectedExceptionMessage Objects excepts DbExpr not allowed.
*/
public function testBindParamExceptionWrongObject()
@ -101,7 +101,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
$this->setDriverGetConnectionMethod();
$result = $this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
$this->assertEquals('SELECT * place_val FROM place_val AND new_val', $result);
$this->assertTrue($result);
}
/**
@ -116,7 +116,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
$this->sql = 'PLAIN SQL';
$result = $this->stmt->execute(array());
$this->assertEquals('PLAIN SQL', $result);
$this->assertTrue($result);
}
/**
@ -217,7 +217,7 @@ class MySQLiStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnValue($mysqliMock));
$this->stmt->execute(array('place' => 'place_val', 'new' => 'new_val'));
$this->assertEquals(array('pair' => 'value'), $this->stmt->fetchPairs());
$this->assertSame(array('pair' => 'value'), $this->stmt->fetchPairs());
}
/**