Skip to content

Commit d822b16

Browse files
committed
fix unit tests for export buttons and details row
1 parent bc471f9 commit d822b16

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/Unit/CrudPanel/CrudPanelReadTest.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,10 @@ public function testHasUploadFieldsUpdateForm()
276276

277277
public function testEnableDetailsRow()
278278
{
279+
if (!backpack_pro()) {
280+
$this->expectException(\Symfony\Component\HttpKernel\Exception\HttpException::class);
281+
}
282+
279283
$this->crudPanel->setOperation('create');
280284
$this->crudPanel->enableDetailsRow();
281285

@@ -307,8 +311,11 @@ public function testGetDefaultPageLength()
307311

308312
public function testEnableExportButtons()
309313
{
310-
$this->crudPanel->enableExportButtons();
314+
if (!backpack_pro()) {
315+
$this->expectException(\Symfony\Component\HttpKernel\Exception\HttpException::class);
316+
}
311317

318+
$this->crudPanel->enableExportButtons();
312319
$this->assertTrue($this->crudPanel->exportButtons());
313320
}
314321

0 commit comments

Comments
 (0)