FEAT #11296 TIME 0:45 sharing subfolder + fix tu

parent b93153a0
......@@ -85,6 +85,8 @@ class FolderController
}
}
if (!$found) {
$insert['level'] = 0;
$insert['parent_id'] = null;
$tree[] = $insert;
}
}
......
......@@ -162,8 +162,6 @@ class BasketControllerTest extends TestCase
$this->assertInternalType('array', $responseBody->allGroups);
$this->assertNotNull($responseBody->allGroups);
$this->assertInternalType('array', $responseBody->pages);
$this->assertNotNull($responseBody->pages);
$users = \Group\models\GroupModel::getUsersByGroupId(['select' => ['id'], 'groupId' => 'AGENT']);
$group = \Group\models\GroupModel::getByGroupId(['select' => ['id'], 'groupId' => 'AGENT']);
......
......@@ -102,7 +102,7 @@ class FolderControllerTest extends TestCase
$this->assertSame(self::$id, $responseBody->folder->id);
$this->assertSame('Mon deuxieme dossier renomme', $responseBody->folder->label);
$this->assertSame(false, $responseBody->folder->public);
$this->assertSame(0, $responseBody->folder->parent_id);
$this->assertSame(null, $responseBody->folder->parent_id);
$this->assertSame(0, $responseBody->folder->level);
$this->assertInternalType('array', $responseBody->folder->sharing->entities);
$this->assertInternalType('integer', $responseBody->folder->user_id);
......@@ -133,7 +133,9 @@ class FolderControllerTest extends TestCase
$this->assertNotEmpty($value->label);
$this->assertInternalType("boolean", $value->public);
$this->assertInternalType("integer", $value->user_id);
$this->assertInternalType("integer", $value->parent_id);
if (!empty($value->parent_id)) {
$this->assertInternalType("integer", $value->parent_id);
}
$this->assertInternalType("integer", $value->level);
$this->assertInternalType("integer", $value->countResources);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment