Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions tests/HomeConnectCloudTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,6 @@ private function cloud()
private function prepareParentIo(int $cloudID): int
{
$parent = IPS_GetInstance($cloudID)['ConnectionID'];
$module = IPS\InstanceManager::getInstanceInterface($parent);
$this->invoke($module, 'RegisterPropertyBoolean', 'Active', false);
$this->invoke($module, 'RegisterPropertyString', 'URL', '');
$this->invoke($module, 'RegisterPropertyString', 'Headers', '');
return $parent;
}

Expand Down
6 changes: 5 additions & 1 deletion tests/HomeConnectConfiguratorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ public function testDiscoveryMatchesOnlyOwnInstances()
private function createDevice(int $cloudID, string $haID): int
{
$device = IPS_CreateInstance(self::DEVICE_GUID);
IPS\InstanceManager::connectInstance($device, $cloudID);
//ConnectParent() already connected the device to the first cloud
if (IPS_GetInstance($device)['ConnectionID'] !== $cloudID) {
IPS_DisconnectInstance($device);
IPS_ConnectInstance($device, $cloudID);
}
//Parent not active: the device does not try to reach the (stubbed) cloud.
IPS\InstanceManager::setStatus($cloudID, IS_INACTIVE);
IPS_SetProperty($device, 'HaID', $haID);
Expand Down
6 changes: 2 additions & 4 deletions tests/HomeConnectDryerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ protected function setUp(): void
//Register our library we need for testing
IPS\ModuleLoader::loadLibrary(__DIR__ . '/../library.json');
$this->ConfiguratorID = IPS_CreateInstance('{CA0E667D-8F28-8DF1-2750-5CF587ECA85A}');
$this->CloudID = IPS_CreateInstance('{CE76810D-B685-9BE0-CC04-38B204DEAD5E}');
IPS_ConnectInstance($this->ConfiguratorID, $this->CloudID);
//ConnectParent() of the configurator already created and connected the cloud
$this->CloudID = IPS_GetInstance($this->ConfiguratorID)['ConnectionID'];
IPS\InstanceManager::setStatus($this->ConfiguratorID, 102);
IPS\InstanceManager::setStatus($this->CloudID, 102);

Expand All @@ -70,10 +70,8 @@ public function testBaseFunctionality()
$cloudInterface = IPS\InstanceManager::getInstanceInterface($this->CloudID);
$cloudInterface->selectedProgram = 'Cotton';
$dryer = IPS_CreateInstance('{F29DF312-A62E-9989-1F1A-0D1E1D171AD3}');
IPS_ConnectInstance($dryer, $this->ConfiguratorID);
$this->assertTrue(true);
$dryer = IPS_CreateInstance('{F29DF312-A62E-9989-1F1A-0D1E1D171AD3}');
IPS_ConnectInstance($dryer, $this->ConfiguratorID);
IPS_SetProperty($dryer, 'HaID', 'BOSCH-WTX87E90-68A40E44C6B9');
IPS_SetProperty($dryer, 'DeviceType', 'Dryer');
IPS_ApplyChanges($dryer);
Expand Down
5 changes: 2 additions & 3 deletions tests/HomeConnectWasherDryerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ protected function setUp(): void
//Register our library we need for testing
IPS\ModuleLoader::loadLibrary(__DIR__ . '/../library.json');
$this->ConfiguratorID = IPS_CreateInstance('{CA0E667D-8F28-8DF1-2750-5CF587ECA85A}');
$this->CloudID = IPS_CreateInstance('{CE76810D-B685-9BE0-CC04-38B204DEAD5E}');
IPS_ConnectInstance($this->ConfiguratorID, $this->CloudID);
//ConnectParent() of the configurator already created and connected the cloud
$this->CloudID = IPS_GetInstance($this->ConfiguratorID)['ConnectionID'];
IPS\InstanceManager::setStatus($this->ConfiguratorID, 102);
IPS\InstanceManager::setStatus($this->CloudID, 102);

Expand Down Expand Up @@ -116,7 +116,6 @@ public function testReadableNameKeepsDigitGroupsTogether()
private function createWasherDryer()
{
$washerDryer = IPS_CreateInstance('{F29DF312-A62E-9989-1F1A-0D1E1D171AD3}');
IPS_ConnectInstance($washerDryer, $this->ConfiguratorID);
IPS_SetProperty($washerDryer, 'HaID', self::HA_ID);
IPS_SetProperty($washerDryer, 'DeviceType', 'WasherDryer');
IPS_ApplyChanges($washerDryer);
Expand Down
Loading