remove expectedException from annotation

This commit is contained in:
Anton Grebnev
2011-12-06 16:22:04 +04:00
parent a942745039
commit 650f311b2b
3 changed files with 15 additions and 37 deletions

View File

@ -137,8 +137,6 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage MongoDB request error.
*/
public function testExecuteNoResult()
{
@ -150,13 +148,12 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->expects($this->any())
->method('execute')
->will($this->returnValue(false));
$this->setExpectedException('GeneralException', 'MongoDB request error.');
$this->stmt->execute();
}
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage No connection to MongoDB server.
*/
public function testExecuteNoConnection()
{
@ -167,6 +164,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->expects($this->any())
->method('getConnection')
->will($this->returnValue(false));
$this->setExpectedException('GeneralException', 'No connection to MongoDB server.');
$this->stmt->execute();
}
@ -284,8 +282,6 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage Invalid fetch mode "222" specified
*/
public function testFetchWrongMode()
{
@ -301,6 +297,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnValue(array('some' => 'val')));
$this->stmt->execute();
$this->setExpectedException('GeneralException', 'Invalid fetch mode "222" specified');
$this->stmt->fetch(222);
}
@ -325,8 +322,6 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage MongoStatement error. Impossible order results of opened cursor
*/
public function testOrderException()
{
@ -340,13 +335,12 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnValue(array('some' => 'val')));
$this->stmt->execute();
$this->setExpectedException('GeneralException', 'MongoStatement error. Impossible order results of opened cursor');
$this->stmt->order(array('id' => 1));
}
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage MongoStatement error. Impossible skip results of opened cursor
*/
public function testSkipException()
{
@ -360,13 +354,12 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnValue(array('some' => 'val')));
$this->stmt->execute();
$this->setExpectedException('GeneralException', 'MongoStatement error. Impossible skip results of opened cursor');
$this->stmt->skip(array('id' => 1));
}
/**
* @runInSeparateProcess
* @expectedException GeneralException
* @expectedExceptionMessage MongoStatement error. Impossible limit results of opened cursor
*/
public function testLimitException()
{
@ -380,6 +373,7 @@ class MongoStatementTest extends PHPUnit_Framework_TestCase
->will($this->returnValue(array('some' => 'val')));
$this->stmt->execute();
$this->setExpectedException('GeneralException', 'MongoStatement error. Impossible limit results of opened cursor');
$this->stmt->limit(array('id' => 1));
}