Skip to content

Commit

Permalink
tweak(tests) fixed some tests for php82
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmhh committed Aug 5, 2024
1 parent a31d88e commit 2532a67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/tine20/Admin/Frontend/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ abstract class Admin_Frontend_TestCase extends TestCase
*/
protected $_json;

protected $objects = [];

/**
* Sets up the fixture.
* This method is called before a test is executed.
Expand Down
6 changes: 3 additions & 3 deletions tests/tine20/Crm/ControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ protected function setUp(): void
'summary' => 'phpunit: crm test task',
));

$this->objects['note'] = new Tinebase_Model_Note(array(
$this->_objects['note'] = new Tinebase_Model_Note(array(
'note_type_id' => Tinebase_Model_Note::SYSTEM_NOTE_NAME_NOTE,
'note' => 'phpunit test note',
));
Expand All @@ -193,7 +193,7 @@ public function testAddLead()
$translate = Tinebase_Translation::getTranslation('Tinebase');

$lead = $this->_objects['initialLead'];
$lead->notes = new Tinebase_Record_RecordSet('Tinebase_Model_Note', array($this->objects['note']));
$lead->notes = new Tinebase_Record_RecordSet('Tinebase_Model_Note', array($this->_objects['note']));
$lead = Crm_Controller_Lead::getInstance()->create($lead);
// TODO remove this nonsense
$GLOBALS['Addressbook_ControllerTest']['leadId'] = $lead->getId();
Expand All @@ -209,7 +209,7 @@ public function testAddLead()
$translatedMessage = $translate->_('created') . ' ' . $translate->_('by') . ' ';
$this->assertEquals($translatedMessage.Zend_Registry::get('currentAccount')->accountDisplayName, $note->note);
} else {
$this->assertEquals($this->objects['note']->note, $note->note);
$this->assertEquals($this->_objects['note']->note, $note->note);
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions tests/tine20/Sales/PurchaseInvoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ class Sales_PurchaseInvoiceTest extends TestCase
protected $_json;

protected $_recordsToDelete = array();

protected $_contactController = null;

/**
* get paging
Expand Down

0 comments on commit 2532a67

Please sign in to comment.