replacement @expectedException to setExpectedException

This commit is contained in:
Vyacheslav Agafonov
2011-12-01 17:35:13 +04:00
parent c214995796
commit 66857702b6
7 changed files with 22 additions and 46 deletions

View File

@ -57,22 +57,19 @@ class DbStatementTest extends PHPUnit_Framework_TestCase
}
/**
* @expectedException GeneralException
* @expectedExceptionMessage Placeholder must be an array or string
* @TODO: change Exception Message 'Placeholder must be an array or string' - no arrays available
*/
public function testBindParamExceptionParam()
{
$val = 1;
$this->setExpectedException('GeneralException', 'Placeholder must be an array or string');
$this->stmt->bindParam(array(), $val);
}
/**
* @expectedException GeneralException
* @expectedExceptionMessage Objects excepts DbExpr not allowed.
*/
public function testBindParamExceptionWrongObject()
{
$this->setExpectedException('GeneralException', 'Objects excepts DbExpr not allowed.');
$val = $this->getMock('NotDbExpr');
$this->stmt->bindParam('paa', $val);
}