class MockCollection in MongoDB 7
Hierarchy
- class \Drupal\mongodb_cache\Tests\MockCollection
Expanded class hierarchy of MockCollection
File
- mongodb_cache/
src/ Tests/ CacheUnitTestCase.php, line 19
Namespace
Drupal\mongodb_cache\TestsView source
class MockCollection {
// @codingStandardsIgnoreEnd
/**
* The exception message to be thrown.
*
* @var string
*/
protected $message;
/**
* MockCollection constructor.
*
* @param string $message
* The exception message to be thrown.
*/
public function __construct($message) {
$this->message = $message;
}
/**
* Always fail, as needed for issue #2974216.
*
* @throws \MongoException
*/
public function save() {
throw new \MongoException($this->message);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MockCollection:: |
protected | property | The exception message to be thrown. | |
MockCollection:: |
public | function | Always fail, as needed for issue #2974216. | |
MockCollection:: |
public | function | MockCollection constructor. |