Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56959084
MongoDBCollectionTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
MongoDBCollectionTest.php
View Options
<?php
/**
* _, __, _, _ __, _ _, _, _
* / \ |_) (_ | | \ | /_\ |\ |
* \ / |_) , ) | |_/ | | | | \|
* ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
*
* Unit testing — MongoDBCollection class
*
* @package ObsidianWorkspaces
* @subpackage Tests
* @author Sébastien Santoro aka Dereckson <dereckson@espace-win.org>
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @filesource
*/
namespace
Waystone\Workspaces\Tests\Engines\Collection
;
use
Waystone\Workspaces\Engines\Collection\MongoDBCollection
;
use
PHPUnit\Framework\Attributes\CoversClass
;
use
PHPUnit\Framework\TestCase
;
/**
* Tests MongoDBCollection class
*/
#[CoversClass(MongoDBCollection::class)]
class
MongoDBCollectionTest
extends
TestCase
{
/**
* @var string Our collection
*/
protected
$collection
;
/**
* Gets default configuration for this test
*
* @return array The configuration block
*/
public
static
function
getConfig
()
{
return
[
'DocumentStorage'
=>
[
'Type'
=>
'MongoDB'
,
'Host'
=>
UNITTESTING_MONGODB_HOST
,
'Port'
=>
UNITTESTING_MONGODB_PORT
,
'SSL'
=>
UNITTESTING_MONGODB_SSL
?
[]
:
null
]
];
}
public
function
setUp
()
:
void
{
global
$Config
;
$Config
=
static
::
getConfig
();
$this
->
initializeDocuments
();
$this
->
collection
=
new
MongoDBCollection
(
'quux'
);
}
use
CRUDTestTrait
;
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Fri, Nov 13, 18:37 (2 d, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4234301
Default Alt Text
MongoDBCollectionTest.php (1 KB)
Attached To
Mode
rOBSIDIAN Obsidian Workspaces
Attached
Detach File
Event Timeline
Log In to Comment