remove expectedException from annotation
This commit is contained in:
@ -72,25 +72,18 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException GeneralException
|
||||
* @expectedExceptionMessage Configuration must have a "hostname".
|
||||
*/
|
||||
public function testGetConnectionNoHostname()
|
||||
{
|
||||
unset($this->conf['hostname']);
|
||||
$this->setExpectedException('GeneralException', 'Configuration must have a "hostname"');
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$mongo->getConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException MongoConnectionException
|
||||
* @expectedExceptionMessage Couldn't authenticate with database
|
||||
*/
|
||||
public function testGetConnectionWrongPassword()
|
||||
{
|
||||
$this->conf['password'] = 'nopass';
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$this->setExpectedException('MongoConnectionException', 'Couldn\'t authenticate with database');
|
||||
$this->assertInstanceOf('MongoDB', $mongo->getConnection());
|
||||
}
|
||||
|
||||
@ -323,8 +316,5 @@ class MongoDriverTest extends PHPUnit_Framework_TestCase
|
||||
$mongo = new MongoDriver($this->conf);
|
||||
$result = $mongo->command('items', array('distinct' =>'items', 'key' => 'name'));
|
||||
$this->assertEquals(4, count($result->fetch(DB::FETCH_ASSOC)));
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user