Browse Source

fix unit tests

Olivier Massot 1 year ago
parent
commit
09ff405b38

+ 0 - 1
src/Enum/Access/FunctionEnum.php

@@ -57,7 +57,6 @@ enum FunctionEnum: string
     case BENEFACTOR_MEMBER = 'BENEFACTOR_MEMBER';
     case BENEFACTOR_MEMBER = 'BENEFACTOR_MEMBER';
     case HOUR_MEMBER = 'HOUR_MEMBER';
     case HOUR_MEMBER = 'HOUR_MEMBER';
     case OTHER = 'OTHER';
     case OTHER = 'OTHER';
-    case COM_STAFF = 'COM_STAFF';
 
 
     /**
     /**
      * Office missions.
      * Office missions.

+ 2 - 2
tests/Unit/Service/Dolibarr/DolibarrApiServiceTest.php

@@ -57,7 +57,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
         $dolibarrApiService
             ->expects(self::once())
             ->expects(self::once())
             ->method('getJsonContent')
             ->method('getJsonContent')
-            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => 'ref_int='.$organizationId])
+            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')'])
             ->willThrowException(new HttpException(404));
             ->willThrowException(new HttpException(404));
 
 
         $society = $dolibarrApiService->getSociety($organizationId);
         $society = $dolibarrApiService->getSociety($organizationId);
@@ -82,7 +82,7 @@ class DolibarrApiServiceTest extends TestCase
         $dolibarrApiService
         $dolibarrApiService
             ->expects(self::once())
             ->expects(self::once())
             ->method('getJsonContent')
             ->method('getJsonContent')
-            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => 'ref_int='.$organizationId])
+            ->with('thirdparties', ['limit' => '1', 'sqlfilters' => '(ef.2iopen_organization_id:=:'.$organizationId.')'])
             ->willThrowException($e);
             ->willThrowException($e);
 
 
         $this->expectException($e::class);
         $this->expectException($e::class);