Closed PeterMis closed 8 years ago
We most likely need to provide a dummy public key, channel and mac address
I've had a look at this and I think you need to create a display for your purposes using the XMDS wrapper, like:
$hardwareId = Random::generateString(12, 'phpunit');
$this->getXmdsWrapper()->RegisterDisplay($hardwareId,
'PHPUnit Test Display',
'windows',
null,
null,
null,
'<Fake mac>',
Random::generateString(50),
Random::generateString(50)
);
// Now find the Id of that Display
$displays = (new XiboDisplay($this->getEntityProvider()))->get();
$display = null;
foreach ($displays as $disp) {
if ($disp->license == $hardwareId) {
$display = $disp;
}
}
if ($display === null) {
$this->fail('Display was not added correctly');
}
// Use $display in your tests
For API testing we do need display to have: XMR (screenshot) MAC address (WoL)