"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tests/tine20/ExampleApplication/ControllerTest.php" between
tine20-2020.08.3.tar.gz and tine20-2020.08.4.tar.gz

About: Tine 2.0 is a platform independent business software system which combines groupware and customer relationship management (CRM). Commercial support is available. Source code.

ControllerTest.php  (tine20-2020.08.3):ControllerTest.php  (tine20-2020.08.4)
skipping to change at line 84 skipping to change at line 84
$createdRecord = ExampleApplication_Controller_ExampleRecord::getInstanc e()->create($record); $createdRecord = ExampleApplication_Controller_ExampleRecord::getInstanc e()->create($record);
$expander = new Tinebase_Record_Expander(ExampleApplication_Model_Exampl eRecord::class, [ $expander = new Tinebase_Record_Expander(ExampleApplication_Model_Exampl eRecord::class, [
Tinebase_Record_Expander::EXPANDER_PROPERTIES => [ Tinebase_Record_Expander::EXPANDER_PROPERTIES => [
ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE => [] ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE => []
] ]
]); ]);
$expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model _ExampleRecord::class, [$createdRecord])); $expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model _ExampleRecord::class, [$createdRecord]));
static::assertTrue($createdRecord->{ExampleApplication_Model_ExampleReco rd::FLD_ONE_TO_ONE} instanceof static::assertTrue($createdRecord->{ExampleApplication_Model_ExampleReco rd::FLD_ONE_TO_ONE} instanceof
ExampleApplication_Model_OneToOne, 'onetoone not instance of ' . Exa mpleApplication_Model_OneToOne::class); ExampleApplication_Model_OneToOne, 'onetoone not instance of ' . Exa mpleApplication_Model_OneToOne::class);
static::assertNull($createdRecord
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD});
$createdRecord->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD} = Addressbook_
Controller_Contact::getInstance()
->get($this->_personas['sclever']->contact_id)->toArray();
$updatedRecord = ExampleApplication_Controller_ExampleRecord::getInstanc
e()->update($createdRecord);
Tinebase_Record_Expander_DataRequest::clearCache();
$expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model
_ExampleRecord::class, [$updatedRecord]));
static::assertSame($this->_personas['sclever']->contact_id, $updatedReco
rd
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD});
$updatedRecord->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_NAME} = 'unittestUpdate';
$updatedRecord = ExampleApplication_Controller_ExampleRecord::getInstanc
e()->update($updatedRecord);
Tinebase_Record_Expander_DataRequest::clearCache();
$expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model
_ExampleRecord::class, [$updatedRecord]));
static::assertSame($this->_personas['sclever']->contact_id, $updatedReco
rd
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD});
static::assertSame('unittestUpdate', $updatedRecord
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_NAME});
// empty string means nulling the field
$updatedRecord->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD} = '';
$updatedRecord = ExampleApplication_Controller_ExampleRecord::getInstanc
e()->update($updatedRecord);
Tinebase_Record_Expander_DataRequest::clearCache();
$expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model
_ExampleRecord::class, [$updatedRecord]));
static::assertNull($updatedRecord
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD});
$updatedRecord->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD} = $this->_pers
onas['pwulf']->contact_id;
$updatedRecord = ExampleApplication_Controller_ExampleRecord::getInstanc
e()->update($updatedRecord);
Tinebase_Record_Expander_DataRequest::clearCache();
$expander->expand(new Tinebase_Record_RecordSet(ExampleApplication_Model
_ExampleRecord::class, [$updatedRecord]));
static::assertSame($this->_personas['pwulf']->contact_id, $updatedRecord
->{ExampleApplication_Model_ExampleRecord::FLD_ONE_TO_ONE}
->{ExampleApplication_Model_OneToOne::FLD_ADB_RECORD});
} }
} }
 End of changes. 1 change blocks. 
0 lines changed or deleted 62 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)