Skip to content

Commit 7dfab70

Browse files
committed
Minor lint fixes
1 parent 24cebe1 commit 7dfab70

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/question_test.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,15 @@ final class question_test extends \advanced_testcase {
4242

4343
/**
4444
* Instance of the question type class
45-
* @var
45+
* @var qtype_aitext
4646
*/
47-
public $qtype;
4847

4948
/**
50-
* There is a live connection to the External AI system
51-
* When run locally it will make a connection. Otherwise the
52-
* tests will be skipped
53-
* @var boolean
54-
*/
49+
* There is a live connection to the External AI system
50+
* When run locally it will make a connection. Otherwise the
51+
* tests will be skipped
52+
* @var bool
53+
*/
5554
protected int $islive;
5655

5756
/**
@@ -63,22 +62,23 @@ final class question_test extends \advanced_testcase {
6362
*/
6463
protected function setUp(): void {
6564
$this->qtype = new \qtype_aitext();
66-
if (defined('TEST_LLM_APIKEY') && defined('TEST_LLM_ORGID')) {
67-
set_config('apikey', TEST_LLM_APIKEY, 'aiprovider_openai');
68-
set_config('orgid', TEST_LLM_ORGID, 'aiprovider_openai');
69-
set_config('enabled', true,'aiprovider_openai');
70-
$this->islive = true;
71-
}
65+
if (defined('TEST_LLM_APIKEY') && defined('TEST_LLM_ORGID')) {
66+
set_config('apikey', TEST_LLM_APIKEY, 'aiprovider_openai');
67+
set_config('orgid', TEST_LLM_ORGID, 'aiprovider_openai');
68+
set_config('enabled', true, 'aiprovider_openai');
69+
$this->islive = true;
70+
}
7271
}
7372
/**
7473
* Make a trivial request to the LLM to check the code works
7574
* Only designed to test the 4.5 subsystem when run locally
7675
* not when in GHA ci
76+
* @covers \qtype_aitext\question::perform_request
7777
* @return void
7878
*/
7979
public function test_perform_request(): void {
8080
$this->resetAfterTest(true);
81-
if(!$this->islive) {
81+
if (!$this->islive) {
8282
$this->markTestSkipped('No live connection to the AI system');
8383
}
8484
$aitext = qtype_aitext_test_helper::make_aitext_question([]);

0 commit comments

Comments
 (0)