1
0
Fork 0
mirror of https://github.com/buddypress/buddypress.git synced 2026-07-22 20:56:55 +08:00
buddypress/tests/phpunit/assets/attachment-extensions.php
Mathieu Viet be4fcf4f4c Improve PHP 8.2 compatibility
- Add the `#[AllowDynamicProperties]` attribute to classes when we add dynamic properties to these into our codebase.
- Add PHP 8.2 to our PHPUnit testing matrix

Closes https://github.com/buddypress/buddypress/pull/62
Fixes #8820



git-svn-id: https://buddypress.svn.wordpress.org/trunk@13414 cdf35c40-ae34-48e0-9cc9-0c9da1808c22
2023-02-10 03:12:09 +00:00

17 lines
447 B
PHP

<?php
/**
* The following implementations of BP_Attachment act as dummy plugins
* for our unit tests
*/
#[AllowDynamicProperties]
class BPTest_Attachment_Extension extends BP_Attachment {
public function __construct( $args = array() ) {
return parent::__construct( $args );
}
public function upload_dir_filter( $upload_dir = array() ) {
$this->original_upload_dir = $upload_dir;
return parent::upload_dir_filter( $upload_dir );
}
}