Skip to content

Commit

Permalink
Merge pull request #621 from sammarshallou/php82fix402
Browse files Browse the repository at this point in the history
Fix PHP 8.2 deprecation warnings in unit tests (4.2)
  • Loading branch information
danmarsden authored Jul 29, 2024
2 parents 6cbf0ac + 0b283e9 commit 2bd16f4
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 0 deletions.
3 changes: 3 additions & 0 deletions classes/local/store/s3/client.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ class client extends object_client_base {
protected $bucket;
private $signingmethod;

/** @var string Prefix for bucket keys */
protected $bucketkeyprefix;

public function __construct($config) {
global $CFG;
$this->autoloader = $CFG->dirroot . '/local/aws/sdk/aws-autoloader.php';
Expand Down
6 changes: 6 additions & 0 deletions classes/tests/testcase.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@

abstract class testcase extends \advanced_testcase {

/** @var test_file_system Filesystem */
public $filesystem;

/** @var \tool_objectfs\log\objectfs_logger Logger */
public $logger;

protected function setUp(): void {
global $CFG;
$CFG->alternative_file_system_class = '\\tool_objectfs\\tests\\test_file_system';
Expand Down
3 changes: 3 additions & 0 deletions tests/local/object_manipulator/checker_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class checker_test extends \tool_objectfs\tests\testcase {
/** @var string $manipulator */
protected $manipulator = checker::class;

/** @var checker Checker */
protected $checker;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down
3 changes: 3 additions & 0 deletions tests/local/object_manipulator/deleter_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class deleter_test extends \tool_objectfs\tests\testcase {
/** @var string $manipulator */
protected $manipulator = deleter::class;

/** @var deleter Deleter object */
protected $deleter;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down
3 changes: 3 additions & 0 deletions tests/local/object_manipulator/orphaner_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class orphaner_test extends \tool_objectfs\tests\testcase {
/** @var string $manipulator */
protected $manipulator = orphaner::class;

/** @var orphaner Orphaner object */
protected $orphaner;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down
3 changes: 3 additions & 0 deletions tests/local/object_manipulator/puller_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ class puller_test extends \tool_objectfs\tests\testcase {
/** @var string $manipulator */
protected $manipulator = puller::class;

/** @var puller Puller object */
protected $puller;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down
3 changes: 3 additions & 0 deletions tests/local/object_manipulator/pusher_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ class pusher_test extends \tool_objectfs\tests\testcase {
/** @var string $manipulator */
protected $manipulator = pusher::class;

/** @var pusher Pusher object */
protected $pusher;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down
6 changes: 6 additions & 0 deletions tests/local/object_manipulator/recoverer_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
*/
class recoverer_test extends \tool_objectfs\tests\testcase {

/** @var candidates_finder Candidates finder object */
protected $candidatesfinder;

/** @var recoverer Recoverer object */
protected $recoverer;

protected function setUp(): void {
parent::setUp();
$config = manager::get_objectfs_config();
Expand Down

0 comments on commit 2bd16f4

Please sign in to comment.