Skip to content
Snippets Groups Projects
Select Git revision
  • 9fa2d1504cc40f4bc93f0156ad67694715f47399
  • master default protected
  • dev protected
  • Issue/3003-stsInstitute
  • gitkeep
  • Issue/2449-GuidPidSlugToProjectSettings
  • Issue/2309-docs
  • Fix/xxxx-updateDependencies
  • Issue/2364-testingKpiParser
  • Issue/2287-guestRole
  • Test/xxxx-pipelineTriggers
  • Issue/2102-gitLabResTypeRCV
  • Issue/2278-gitlabToS
  • Issue/2101-gitLabResTypeUi
  • Issue/1788-extractionCronjob
  • Issue/2183-kpiGeneratorResource
  • Issue/2222-resourceDateCreated
  • Issue/2221-projectDateCreated
  • Issue/1321-pidEnquiryOverhaul
  • Issue/1999-gitlabResourcesLib
  • Issue/1951-quotaImplementation
  • v2.22.0
  • v2.20.0
  • v2.19.1
  • v2.19.0
  • v2.18.0
  • v2.17.0
  • v2.16.2
  • v2.16.1
  • v2.16.0
  • v2.15.0
  • v2.14.0
  • v2.13.0
  • v2.12.1
  • v2.12.0
  • v2.11.1
  • v2.11.0
  • v2.10.1
  • v2.10.0
  • v2.9.1
  • v2.9.0
41 results

Model.cs

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    PolarisAnalyticsEngineHelperTest.php 1.15 KiB
    <?php
    
    require "PolarisAnalyticsEngineHelper.php";
    class PolarisAnalyticsEngineHelperTest
    {
        private $helper;
    
        public function __construct($analytics_token)
        {
            $this->helper = new PolarisAnalyticsEngineHelper($analytics_token);
        }
    
        public function testGetStatements()
        {
            $statements = $this->helper->getStatements();
            print_r("All statements \n\r");
            print_r($statements);
        }
    
        public function testSaveResults($user)
        {
            $result = [
                "current_time" => strtotime("now"),
                "user" => $user // only for test
            ];
            $resultResponse = $this->helper->saveResult($result,"test description",$user);
            print_r($resultResponse);
        }
    
        public function testGetResults()
        {
           $existing_result = $this->helper->getExistingResult();
           print_r($existing_result);
        }
    }
    
    $test = new PolarisAnalyticsEngineHelperTest("0838b91a5d71822ce87bab1de5dd65c52add4865dd2bbcb372604163940285c4");
    $test->testGetStatements();
    
    $test->testSaveResults("user1@polaris.com");
    $test->testSaveResults("user2@polaris.com");
    $test->testSaveResults("user3@polaris.com");
    
    $test->testGetResults();