◆ getMockEnviroment()
  
  
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::getMockEnviroment  | 
          ( | 
          bool  | 
          $expect_insert,  | 
         
        
           | 
           | 
          int  | 
          $expected_context_id = 0  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 30 of file ilOrgUnitOperationRegisteredObjectiveTest.php.
Referenced by testAchieve(), testIsApplicable(), and testIsApplicableInvalidContextException().
   34         $db = $this->createMock(ilDBInterface::class);
    37                 ->expects(self::once())
    39                 ->with(
'il_orgu_operations', [
    40                     'operation_id' => [
'integer', $this->next_id],
    41                     'operation_string' => [
'text', $this->operation],
    42                     'description' => [
'text', $this->description],
    43                     'list_order' => [
'integer', 0],
    44                     'context_id' => [
'integer', $expected_context_id],
    47                 ->expects(self::once())
    49                 ->with(
'il_orgu_operations')
    50                 ->willReturn($this->next_id);
    53         $env = $this->createMock(Environment::class);
    55             ->method(
'getResource')
    56             ->with(Environment::RESOURCE_DATABASE)
 An environment holds resources to be used in the setup process. 
 
 
 
 
◆ getMockObjective()
  
  
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::getMockObjective  | 
          ( | 
          bool  | 
          $does_op_already_exist,  | 
         
        
           | 
           | 
          int  | 
          $context_id,  | 
         
        
           | 
           | 
          string  | 
          $operation_name  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
protected   | 
  
 
Definition at line 62 of file ilOrgUnitOperationRegisteredObjectiveTest.php.
Referenced by testAchieve(), testGetHash(), testGetPreconditions(), testIsApplicable(), and testIsApplicableInvalidContextException().
   69                 ilOrgUnitOperationRegisteredObjective::class
    71             ->setConstructorArgs([$operation_name, $this->description, 
'context'])
    72             ->onlyMethods([
'getContextId', 
'doesOperationExistInContext'])
    76             ->method(
'getContextId')
    77             ->with($this->isInstanceOf(ilDBInterface::class), 
'context')
    78             ->willReturn($context_id);
    80             ->method(
'doesOperationExistInContext')
    81             ->with($this->isInstanceOf(ilDBInterface::class), $context_id, $operation_name)
    82             ->willReturn($does_op_already_exist);
 
 
 
 
◆ testAchieve()
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::testAchieve  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testGetHash()
  
  
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::testGetHash  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
 
◆ testGetPreconditions()
  
  
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::testGetPreconditions  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 97 of file ilOrgUnitOperationRegisteredObjectiveTest.php.
References getMockObjective().
   99         $env = $this->createMock(Environment::class);
   101         $this->assertContainsOnlyInstancesOf(
   102             ilDatabaseInitializedObjective::class,
   103             $obj->getPreconditions($env)
 getMockObjective(bool $does_op_already_exist, int $context_id, string $operation_name)
 
 
 
 
◆ testIsApplicable()
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::testIsApplicable  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ testIsApplicableInvalidContextException()
      
        
          | ilOrgUnitOperationRegisteredObjectiveTest::testIsApplicableInvalidContextException  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ $description
  
  
      
        
          | string ilOrgUnitOperationRegisteredObjectiveTest::$description = 'description' | 
         
       
   | 
  
protected   | 
  
 
 
◆ $next_id
  
  
      
        
          | int ilOrgUnitOperationRegisteredObjectiveTest::$next_id = 3 | 
         
       
   | 
  
protected   | 
  
 
 
◆ $operation
  
  
      
        
          | string ilOrgUnitOperationRegisteredObjectiveTest::$operation = 'first operation' | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: