Skip to content

Commit

Permalink
Add missing properties to test classes
Browse files Browse the repository at this point in the history
Ported from Shardj/zf1-future#289

PHP 8.2: Dynamic Properties are deprecated fix

Reference: https://php.watch/versions/8.2/dynamic-properties-deprecated
  • Loading branch information
hungtrinh authored and falkenhawk committed May 18, 2023
1 parent 14677fc commit 3f8be99
Show file tree
Hide file tree
Showing 289 changed files with 2,768 additions and 5 deletions.
5 changes: 5 additions & 0 deletions tests/Zend/Amf/Adobe/IntrospectorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
*/
class Zend_Amf_Adobe_IntrospectorTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Zend_Amf_Adobe_Introspector|mixed
*/
protected $introspector;

public static function main()
{
$suite = new PHPUnit_Framework_TestSuite(__CLASS__);
Expand Down
13 changes: 13 additions & 0 deletions tests/Zend/Amf/AuthTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
class Zend_Amf_AuthTest extends PHPUnit_Framework_TestCase
{

/**
* @var \Zend_Acl|mixed
*/
protected $_acl;

/**
* Enter description here...
*
Expand Down Expand Up @@ -295,6 +300,14 @@ public function authenticate() {

class RightPassword extends Zend_Amf_Auth_Abstract
{
/**
* @var mixed
*/
protected $_name;
/**
* @var mixed
*/
protected $_role;
public function __construct($name, $role)
{
$this->_name = $name;
Expand Down
10 changes: 10 additions & 0 deletions tests/Zend/Amf/ResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,16 @@
*/
class Zend_Amf_ResponseTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Zend_Amf_Value_MessageHeader|mixed
*/
protected $header1;

/**
* @var \Zend_Amf_Value_MessageHeader|mixed
*/
protected $header2;

// The message response status code.
public $responseURI = "/2/onResult";

Expand Down
5 changes: 5 additions & 0 deletions tests/Zend/Amf/Value/MessageBodyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
*/
class Zend_Amf_Value_MessageBodyTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Zend_Amf_Value_MessageBody|mixed
*/
protected $body;

/**
* Runs the test methods of this class.
*
Expand Down
20 changes: 20 additions & 0 deletions tests/Zend/Application/Bootstrap/BootstrapTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@
*/
class Zend_Application_Bootstrap_BootstrapTest extends PHPUnit_Framework_TestCase
{
/**
* @var mixed[]|mixed
*/
protected $loaders;

/**
* @var \Zend_Loader_Autoloader
*/
protected $autoloader;

/**
* @var \Zend_Application|mixed
*/
protected $application;

/**
* @var \Zend_Application_Bootstrap_Bootstrap|mixed
*/
protected $bootstrap;

public static function main()
{
$suite = new PHPUnit_Framework_TestSuite(__CLASS__);
Expand Down
10 changes: 10 additions & 0 deletions tests/Zend/Cache/ClassFrontendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,16 @@ public function throwException()
*/
class Zend_Cache_ClassFrontendTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend1;

/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend2;

private $_instance1;
private $_instance2;

Expand Down
5 changes: 5 additions & 0 deletions tests/Zend/Cache/CoreTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@
*/
class Zend_Cache_CoreTest extends PHPUnit_Framework_TestCase
{
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend;

private $_instance;

public function setUp()
Expand Down
4 changes: 4 additions & 0 deletions tests/Zend/Cache/FileFrontendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* @group Zend_Cache
*/
class Zend_Cache_FileFrontendTest extends PHPUnit_Framework_TestCase {
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend;

private $_instance1;
private $_instance2;
Expand Down
4 changes: 4 additions & 0 deletions tests/Zend/Cache/FunctionFrontendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ public function foobar($param1, $param2)
* @group Zend_Cache
*/
class Zend_Cache_FunctionFrontendTest extends PHPUnit_Framework_TestCase {
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend;

private $_instance;

Expand Down
6 changes: 6 additions & 0 deletions tests/Zend/Cache/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
*/
class Zend_Cache_ManagerTest extends PHPUnit_Framework_TestCase
{
protected $_cache_dir;

/**
* @var \Zend_Cache_Core|null|mixed
*/
protected $_cache;

public function setUp()
{
Expand Down
4 changes: 4 additions & 0 deletions tests/Zend/Cache/OutputFrontendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* @group Zend_Cache
*/
class Zend_Cache_OutputFrontendTest extends PHPUnit_Framework_TestCase {
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend;

private $_instance;

Expand Down
4 changes: 4 additions & 0 deletions tests/Zend/Cache/PageFrontendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
* @group Zend_Cache
*/
class Zend_Cache_PageFrontendTest extends PHPUnit_Framework_TestCase {
/**
* @var \Zend_Cache_Backend_Test|mixed
*/
protected $_backend;

private $_instance;

Expand Down
10 changes: 10 additions & 0 deletions tests/Zend/Captcha/DumbTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@
*/
class Zend_Captcha_DumbTest extends PHPUnit_Framework_TestCase
{
protected $word;

/**
* @var \Zend_Form_Element_Captcha|mixed
*/
protected $element;
/**
* @var \Zend_Captcha_Adapter|mixed
*/
protected $captcha;
/**
* Runs the test methods of this class.
*
Expand Down
20 changes: 20 additions & 0 deletions tests/Zend/Captcha/FigletTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,26 @@
*/
class Zend_Captcha_FigletTest extends PHPUnit_Framework_TestCase
{
/**
* @var mixed|string
*/
protected $word;

/**
* @var \Zend_Form_Element_Captcha|mixed
*/
protected $element;

/**
* @var \Zend_Captcha_Adapter|mixed
*/
protected $captcha;

/**
* @var string
*/
protected $id;

/**
* Runs the test methods of this class.
*
Expand Down
25 changes: 25 additions & 0 deletions tests/Zend/Captcha/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,31 @@
*/
class Zend_Captcha_ImageTest extends PHPUnit_Framework_TestCase
{
/**
* @var mixed|string
*/
protected $word;

/**
* @var string|mixed
*/
protected $testDir;

/**
* @var \Zend_Form_Element_Captcha|mixed
*/
protected $element;

/**
* @var \Zend_Captcha_Adapter|mixed
*/
protected $captcha;

/**
* @var string
*/
protected $id;

protected $_tmpDir;

/**
Expand Down
12 changes: 12 additions & 0 deletions tests/Zend/Captcha/ReCaptchaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
*/
class Zend_Captcha_ReCaptchaTest extends PHPUnit_Framework_TestCase
{
protected $word;

/**
* @var \Zend_Form_Element_Captcha|mixed
*/
protected $element;

/**
* @var \Zend_Captcha_Adapter
*/
protected $captcha;

/**
* Runs the test methods of this class.
*
Expand Down
25 changes: 25 additions & 0 deletions tests/Zend/Config/IniTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,31 @@
*/
class Zend_Config_IniTest extends PHPUnit_Framework_TestCase
{
/**
* @var string|mixed
*/
protected $_iniFileMultipleInheritanceConfig;

/**
* @var string|mixed
*/
protected $_iniFileSeparatorConfig;

/**
* @var string
*/
protected $_nonReadableConfig;

/**
* @var string|mixed
*/
protected $_iniFileNoSectionsConfig;

/**
* @var string|mixed
*/
protected $_iniFileInvalid;

protected $_iniFileConfig;
protected $_iniFileAllSectionsConfig;
protected $_iniFileCircularConfig;
Expand Down
30 changes: 30 additions & 0 deletions tests/Zend/Config/XmlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,36 @@
*/
class Zend_Config_XmlTest extends PHPUnit_Framework_TestCase
{
/**
* @var string|mixed
*/
protected $_xmlFileTopLevelStringConfig;

/**
* @var string|mixed
*/
protected $_xmlFileOneTopLevelStringConfig;

/**
* @var string
*/
protected $_nonReadableConfig;

/**
* @var string|mixed
*/
protected $_xmlFileSameNameKeysConfig;

/**
* @var string|mixed
*/
protected $_xmlFileShortParamsOneConfig;

/**
* @var string|mixed
*/
protected $_xmlFileShortParamsTwoConfig;

protected $_xmlFileConfig;
protected $_xmlFileAllSectionsConfig;
protected $_xmlFileCircularConfig;
Expand Down
Loading

0 comments on commit 3f8be99

Please sign in to comment.