Skip to content
This repository has been archived by the owner on Aug 9, 2021. It is now read-only.

Commit

Permalink
fix(test): add slashes
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislas <[email protected]>
  • Loading branch information
stonebuzz committed Sep 25, 2020
1 parent 6ad35b7 commit 3b50a0c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ env:
- AFTER_SUCCESS_BRANCH=9.5/bugfixes
- secure: Y9sG3lZ3Fn3t5BXvcMJQxWsdSUVQgF4M08E6oouYrRc95HEj3ZwZOqp6Df58u8CQFA0EKJyvCBLn8UicvHGMKAD0RwGLBdSP4Ji9gJRZkyMZi79awSshdva/c8dqVQrRd4asuTNQfcagVJpNDnY8sYusw504JUilK3vFVp+39nNZUkcvT69NGVIlXzgHTYinBkVuqDhf5eVtcLcaESLEshrg+5ZERdm+0KifdJVREzhicJxofnmTl/wBsIP7XiQqspljf2/SxLqreGmWXYXUfqIwIOVtsd9fkZChQCz8USC7P427tH6styRDYuMCtvA9b/T/XacSdKFbuDezff3NbIM3b5BebDyCrOK5MGSOdRUY5RuyZN4R5LjePUE++9QNCUPeDSkfb23v0VfuqXIRAxfdtik517GzFy6O7/e6FU1msVZlGQED7Uek9nqnupj+0lIq+99Jcm1UCNJu1NTL2Tv80XXqySaxyE4Sedq/FiYAsy1bo2cg2367I2b4FhFXaJCKkFHcdjHXAeurkRy/brSPhBNoOO5/GA3RepUErgly4P8TLZqHNZv8rgMUoQ88sdwDyXG7dY4UwWiTlCkxMBTqBqJanlTMA9zn2bYyMDioTGnA7+VYAA8cddjFOMVrmmuFJ+YV2x1+5B5qd+Wt8RPwcPQDyqaiN5amb1HGeMA=
matrix:
- GLPI_BRANCH=9.4/bugfixes FI_BRANCH=glpi9.4+1.1
- GLPI_BRANCH=9.4/bugfixes FI_BRANCH=glpi9.4+2.4
- GLPI_BRANCH=9.5/bugfixes FI_BRANCH=glpi9.5+1.0
- GLPI_BRANCH=master FI_BRANCH=master

Expand Down
2 changes: 1 addition & 1 deletion tests/suite-install/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public function testInstallPlugin() {
foreach ($extensions as $extension => $name) {
$documentType = new \DocumentType();
$doc_id = $documentType->getFromDBByCrit(['ext' => $extension]);
$this->integer($doc_id)->isGreaterThan(0);
$this->boolean($doc_id)->isTrue();
$this->string($documentType->getField('name'))->isEqualTo($name);
}
}
Expand Down
3 changes: 2 additions & 1 deletion tests/suite-integration/PluginFlyvemdmTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
namespace tests\units;

use Flyvemdm\Tests\CommonTestCase;
use ToolboxTest;

class PluginFlyvemdmTask extends CommonTestCase {

Expand Down Expand Up @@ -243,7 +244,7 @@ private function checkNotifiableMqttMessage(\PluginFlyvemdmNotifiableInterface $

// check the message
$policyName = $policy->getField('symbol');
$expectedTopic = "Policy/$policyName/Task/$taskId";
$expectedTopic = \Toolbox::addslashes_deep("Policy/$policyName/Task/$taskId");
$policyValue = $task->getField('value') == '0' ? 'false' : 'true';
$receivedMqttMessage = ['storageEncryption' => $policyValue, 'taskId' => $taskId];
$encodedMessage = json_encode($receivedMqttMessage, JSON_UNESCAPED_SLASHES);
Expand Down

0 comments on commit 3b50a0c

Please sign in to comment.