Skip to content

Commit fcbe120

Browse files
committed
fix test failure caused by test setup issue
1 parent bb366e1 commit fcbe120

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/tests/AdminTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ protected function doTestReachableAdminRoutes($admin)
110110

111111
// if an ID is required, try and find a document to test
112112
if (isset($requirements['id'])) {
113-
if ($document = $this->dm->getRepository($class)->findOneBy(array())) {
113+
$document = $admin->createQuery('list')->execute()->first();
114+
if ($document) {
114115
$node = $this->dm->getNodeForDocument($document);
115116
$routeParams['id'] = $node->getPath();
116117
} else {

0 commit comments

Comments
 (0)