Skip to content

Commit

Permalink
50475 update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
yeneastgate committed Jul 3, 2024
1 parent 6205aef commit be46a8d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion plugin/EstateList.php
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ public function getEnvironment(): EstateListEnvironment
*/
public function getListViewId()
{
if($this->getDataView() instanceof DataListView) {
if ($this->getDataView() instanceof DataListView) {
return $this->getDataView()->getId();
}

Expand Down
5 changes: 4 additions & 1 deletion tests/TestClassContentFilterShortCodeEstateDetail.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
use onOffice\WPlugin\API\ApiClientException;
use onOffice\WPlugin\DataView\DataDetailView;
use onOffice\WPlugin\Controller\EstateListEnvironmentDefault;
use onOffice\WPlugin\EstateList;
use onOffice\WPlugin\SDKWrapper;
use onOffice\WPlugin\DataView\DataDetailViewHandler;
use onOffice\WPlugin\EstateDetail;
Expand Down Expand Up @@ -77,6 +78,7 @@ private function generateEstateDetail()
'getCurrentEstateId',
'getSimilarEstates',
'loadSingleEstate',
'getListViewId',
])
->disableOriginalConstructor()
->getMock();
Expand Down Expand Up @@ -142,9 +144,10 @@ private function generateEstateDetail()
$this->_pEstate->method('getDocument')->willReturn('');
$this->_pEstate->method('getCurrentEstateId')->willReturn(52);
$this->_pEstate->method('getSimilarEstates')->willReturn('');
$this->_pEstate->method('getListViewId')->willReturn('estate_detail');
}

public function testRender()
public function testRender123()
{
$pTemplateMocker = new TemplateMocker();
$pDataDetailViewHandler = $this->getMockBuilder(DataDetailViewHandler::class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ label-sonstige_angaben: Vereinbaren Sie noch heute einen Besichtigungstermin
* Contact person: Peter Parker
<a href="https://asd.de" title="test movie">test movie</a>
Fotolia_3286409_Subscription_XL: https://image.onoffice.de/smart25/Objekte/index.php?kunde=Ivanova&#038;datensatz=52&#038;filename=Titelbild_362.jpg
<div id="map" style="width: 100%; height: 100%;"></div>
<div class="oo-map" id="oo_map_estate_detail" style="width: 100%; height: 100%;"></div>
<script>
(function() {
var estateMarkers = [{"latlng":{"lat":48.8582345,"lng":2.2944223},"options":{"title":""},"visible":true}];
var map = L.map('map', {
let mapId = oo_map_estate_detail;
var map = L.map(mapId, {
center: [50.8, 10.0],
zoom: 5
});
Expand Down

0 comments on commit be46a8d

Please sign in to comment.