Skip to content

Commit f9907d4

Browse files
committed
Misc. minor fixes
1 parent 05428f8 commit f9907d4

4 files changed

Lines changed: 11 additions & 8 deletions

File tree

doc/fields/AssociationField.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ method. You can customize this display using either a 1) callback (for simple
6262
text) or a 2) Twig template (for complex HTML).
6363

6464
.. tip::
65+
6566
If you customize the autocomplete for a given class (for example, ``User``)
6667
in the same way across different CRUD controllers, you can
6768
:ref:`configure this globally <crud-autocomplete>` per CRUD and/or Dashboard.

src/Test/AbstractCrudTestCase.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ abstract class AbstractCrudTestCase extends WebTestCase
2424
use CrudTestIndexAsserts;
2525
use CrudTestUrlGeneration;
2626

27-
protected KernelBrowser $client;
28-
protected AdminUrlGeneratorInterface $adminUrlGenerator;
29-
protected EntityManagerInterface $entityManager;
27+
protected ?KernelBrowser $client = null;
28+
protected ?AdminUrlGeneratorInterface $adminUrlGenerator = null;
29+
protected ?EntityManagerInterface $entityManager = null;
3030

3131
protected function setUp(): void
3232
{
@@ -44,12 +44,14 @@ protected function setUp(): void
4444

4545
protected function tearDown(): void
4646
{
47-
if (isset($this->entityManager) && $this->entityManager->isOpen()) {
47+
if (null !== $this->entityManager && $this->entityManager->isOpen()) {
4848
$this->entityManager->clear();
4949
$this->entityManager->getConnection()->close();
5050
}
5151

52-
unset($this->client, $this->entityManager, $this->adminUrlGenerator);
52+
$this->client = null;
53+
$this->entityManager = null;
54+
$this->adminUrlGenerator = null;
5355

5456
parent::tearDown();
5557

tests/Functional/Apps/DefaultApp/translations/messages.en.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
return [
44
'entities' => [
5-
\EasyCorp\Bundle\EasyAdminBundle\Tests\Functional\Apps\DefaultApp\Entity\Category::class => [
5+
EasyCorp\Bundle\EasyAdminBundle\Tests\Functional\Apps\DefaultApp\Entity\Category::class => [
66
'singular' => 'Category (singular from file)',
77
'plural' => 'Categories (plural from file)',
88
'properties' => [

tests/Functional/Default/Dashboard/EntityTranslationsTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public function testTranslatedLabelsAppearedInTableHeaders(): void
5252
$tableHeaders = $crawler->filter('table.datagrid thead th');
5353

5454
$headerTexts = [];
55-
$tableHeaders->each(function ($node) use (&$headerTexts) {
55+
$tableHeaders->each(static function ($node) use (&$headerTexts) {
5656
$headerTexts[] = trim($node->text());
5757
});
5858

@@ -70,7 +70,7 @@ public function testMenuItemUsesEntityPluralTranslation(): void
7070
// when menu item label is null, it should use the entity's plural translation
7171
$menuItems = $crawler->filter('.menu-item a');
7272
$menuTexts = [];
73-
$menuItems->each(function ($node) use (&$menuTexts) {
73+
$menuItems->each(static function ($node) use (&$menuTexts) {
7474
$menuTexts[] = trim($node->text());
7575
});
7676

0 commit comments

Comments
 (0)