Skip to content

Commit

Permalink
test are fixed
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
  • Loading branch information
julien-nc committed Sep 20, 2024
1 parent b10a652 commit c197b97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/php/service/LocalProjectServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static function tearDownAfterClass(): void {
$groupManager->get('group2test')->delete();
}

protected function tearDown(): void {
protected function tearDown(): void {
$this->deleteTestProjects();
}

Expand All @@ -139,6 +139,7 @@ private function deleteTestProjects(): void {
'original',
'newproject',
'superprojS',
'tsl',
];
foreach ($projIds as $projId) {
try {
Expand Down Expand Up @@ -795,7 +796,7 @@ public function testPage() {
} catch (CospendBasicException) {
}
try {
$res = $this->localProjectService->editCurrency('superproj', -1, 'dolrenamed', 2);
$res = $this->localProjectService->editCurrency('superproj', -1, 'dolrenamed', 2);
$this->assertFalse(true);
} catch (CospendBasicException) {
}
Expand Down Expand Up @@ -1540,7 +1541,6 @@ public function testPage() {

public function testSearchBills() {
$resp = $this->apiController->createProject('superprojS', 'SuperProj');
echo 'CRPRO '.json_encode($resp->getData());
$status = $resp->getStatus();
$this->assertEquals(Http::STATUS_OK, $status);
$data = $resp->getData();
Expand Down Expand Up @@ -1666,9 +1666,9 @@ public function testgetNbBills() {
}

public function createAndPopulateProject($projectId): ?array {
$resp = $this->apiController->createProject($projectId, 'SuperProj', 'toto');
$resp = $this->apiController->createProject($projectId, 'SuperProj');
$status = $resp->getStatus();
$this->assertEquals(Http::STATUS_OK, $status);
$this->assertEquals(Http::STATUS_OK, $status, $projectId . ' :: ' . json_encode($resp->getData()));
$data = $resp->getData();
$this->assertEquals($projectId, $data['id']);
$resp = $this->apiController->createMember($projectId, 'member1');
Expand Down Expand Up @@ -1799,9 +1799,9 @@ public function testShareLink() {
$this->createAndPopulateProject($projectId);

$result = $this->localProjectService->createPublicShare($projectId);
$this->assertTrue(isset($result['token']));
$this->assertTrue(isset($result['userid']));
$this->assertTrue(isset($result['id']));
$token = $result['token'];
$token = $result['userid'];

$projInfo = $this->localProjectService->getLinkShareInfoFromShareToken($token);
$this->assertEquals($projectId, $projInfo['projectid']);
Expand Down

0 comments on commit c197b97

Please sign in to comment.