Skip to content

Commit

Permalink
tweak(php82) fixed a lot of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmhh committed Aug 5, 2024
1 parent b6871d1 commit ac626cd
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 9 deletions.
2 changes: 2 additions & 0 deletions tests/tine20/ActiveSync/Command/PingTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class ActiveSync_Command_PingTests extends TestCase
* @var Syncroton_Backend_IContent
*/
protected $_contentStateBackend;

protected $_setGeoData;

/**
* Runs the test methods of this class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class Calendar_Frontend_CalDAV_FixMultiGet404PluginTest extends Calendar_TestCas
*/
protected $plugin;

protected $response;

/**
* Sets up the fixture.
* This method is called before a test is executed.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class Calendar_Frontend_CalDAV_PluginDefaultAlarmsTest extends TestCase
* @var \Sabre\DAV\Server
*/
protected $server;

protected $plugin;

/**
* Sets up the fixture.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class Calendar_Frontend_CalDAV_PluginManagedAttachmentsTest extends TestCase
* @var \Sabre\DAV\Server
*/
protected $server;

protected $calDAVTests;

protected $response;

/**
* Sets up the fixture.
Expand Down
7 changes: 5 additions & 2 deletions tests/tine20/Calendar/Frontend/CalDAV/ProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class Calendar_Frontend_CalDAV_ProxyTest extends TestCase
* @var \Sabre\DAV\Server
*/
protected $server;

protected $sharedContainer;
protected $otherUsersContainer;
protected $response;

/**
* Sets up the fixture.
Expand All @@ -31,7 +35,7 @@ class Calendar_Frontend_CalDAV_ProxyTest extends TestCase
* @access protected
*/
protected function setUp(): void
{
{
parent::setUp();

// create shared folder and other users folder
Expand Down Expand Up @@ -68,7 +72,6 @@ protected function setUp(): void

$this->server->addPlugin(new \Sabre\DAV\Auth\Plugin(new Tinebase_WebDav_Auth()));
$aclPlugin = new \Sabre\DAVACL\Plugin();
$aclPlugin->defaultUsernamePath = Tinebase_WebDav_PrincipalBackend::PREFIX_USERS;
$aclPlugin->principalCollectionSet = array (Tinebase_WebDav_PrincipalBackend::PREFIX_USERS, Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS);
$this->server->addPlugin($aclPlugin);

Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/DFCom/HTTPAPIv1Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class DFCom_HTTPAPIv1Test extends TestCase
* @var Tinebase_Server_UnittestEmitter
*/
public $emitter;
protected $server;
protected $container;

/**
* set up tests
Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/Tasks/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Tasks_ControllerTest extends TestCase
* @var array
*/
protected $_modelNames = array('Tasks_Model_Task' => 'Task');

protected Tasks_Controller_Task $_controller;

/**
* Sets up the fixture, for example, opens a network connection.
Expand Down
2 changes: 1 addition & 1 deletion tests/tine20/Tasks/JsonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Tasks_JsonTest extends TestCase
*
* @var array
*/
protected $_smtpConfig = array();
protected $_smtpConfig = [];

/**
* smtp config changed
Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ abstract class TestCase extends \PHPUnit\Framework\TestCase

protected $_containerToDelete = [];

protected $_smtpConfig = [];

/**
* set up tests
*/
Expand Down
1 change: 0 additions & 1 deletion tests/tine20/Tinebase/WebDav/Plugin/ACLTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ protected function setUp(): void
);

$this->plugin = new Tinebase_WebDav_Plugin_ACL();
$this->plugin->defaultUsernamePath = Tinebase_WebDav_PrincipalBackend::PREFIX_USERS;
$this->plugin->principalCollectionSet = [
Tinebase_WebDav_PrincipalBackend::PREFIX_USERS,
Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ protected function setUp(): void
$this->server->addPlugin($plugin);

$aclPlugin = new \Sabre\DAVACL\Plugin();
$aclPlugin->defaultUsernamePath = Tinebase_WebDav_PrincipalBackend::PREFIX_USERS;
$aclPlugin->principalCollectionSet = array (Tinebase_WebDav_PrincipalBackend::PREFIX_USERS, Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS);
$this->server->addPlugin($aclPlugin);

Expand Down
1 change: 0 additions & 1 deletion tests/tine20/Tinebase/WebDav/Plugin/PropfindTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ protected function setUp(): void
$this->server->addPlugin($plugin);

$aclPlugin = new Tinebase_WebDav_Plugin_ACL();
$aclPlugin->defaultUsernamePath = Tinebase_WebDav_PrincipalBackend::PREFIX_USERS;
$aclPlugin->principalCollectionSet = array(Tinebase_WebDav_PrincipalBackend::PREFIX_USERS, Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS, Tinebase_WebDav_PrincipalBackend::PREFIX_INTELLIGROUPS
);
$aclPlugin->principalSearchPropertySet = array(
Expand Down
1 change: 0 additions & 1 deletion tests/tine20/Tinebase/WebDav/PrincipalBackendTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ public function testPrincipalsWithBrokenGroupList()
);

$aclPlugin = new Tinebase_WebDav_Plugin_ACL();
$aclPlugin->defaultUsernamePath = Tinebase_WebDav_PrincipalBackend::PREFIX_USERS;
$aclPlugin->principalCollectionSet = array (Tinebase_WebDav_PrincipalBackend::PREFIX_USERS, Tinebase_WebDav_PrincipalBackend::PREFIX_GROUPS, Tinebase_WebDav_PrincipalBackend::PREFIX_INTELLIGROUPS
);
$aclPlugin->principalSearchPropertySet = array(
Expand Down
3 changes: 2 additions & 1 deletion tine20/Timetracker/Model/TimeaccountFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ class Timetracker_Model_TimeaccountFilter extends Tinebase_Model_Filter_FilterGr
* @var boolean
*/
protected $_isResolved = FALSE;


protected array $_validTimeaccounts = [];
/**
* set options
*
Expand Down
2 changes: 1 addition & 1 deletion tine20/Tinebase/Export/Abstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ protected function _getCurrentState()
'_twigTemplate' => $this->_twigTemplate,
'_twigMapping' => $this->_twigMapping,
'_keyFields' => $this->_keyFields,
'_virtualField' => $this->_virtualFields,
'_virtualFields' => $this->_virtualFields,
);
}

Expand Down

0 comments on commit ac626cd

Please sign in to comment.