File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313
1414namespace Sonata \ClassificationBundle \Tests \Admin ;
1515
16- use PHPUnit \Framework \MockObject \MockObject ;
1716use PHPUnit \Framework \TestCase ;
1817use Sonata \AdminBundle \Admin \AbstractAdmin ;
1918use Sonata \AdminBundle \Admin \AdminExtensionInterface ;
@@ -46,21 +45,23 @@ public function testGetPersistentParametersWithNoExtension(): void
4645 'hide_context ' => 0 ,
4746 ];
4847
48+ $ admin = new
4949 /** @phpstan-extends ContextAwareAdmin<ContextAwareInterface> */
50- $ admin = new class ($ this ->contextManager ) extends ContextAwareAdmin {};
50+ class ($ this ->contextManager ) extends ContextAwareAdmin {};
5151
5252 static ::assertSame ($ expected , $ admin ->getPersistentParameters ());
5353 }
5454
5555 public function testGetPersistentParametersWithValidExtension (): void
5656 {
57- /** @phpstan-extends ContextAwareAdmin<ContextAwareInterface> */
58- $ admin = new class ($ this ->contextManager ) extends ContextAwareAdmin {
59- public function __construct (ContextManagerInterface $ contextManager )
60- {
61- parent ::__construct ($ contextManager );
62- }
63- };
57+ $ admin = new
58+ /** @phpstan-extends ContextAwareAdmin<ContextAwareInterface> */
59+ class ($ this ->contextManager ) extends ContextAwareAdmin {
60+ public function __construct (ContextManagerInterface $ contextManager )
61+ {
62+ parent ::__construct ($ contextManager );
63+ }
64+ };
6465
6566 $ extension = $ this ->createMock (AdminExtensionInterface::class);
6667 $ extension ->expects (static ::once ())->method ('configurePersistentParameters ' )->with (
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testSetterGetter(): void
2626 $ time = new \DateTime ();
2727
2828 $ context = new class extends Context {
29- public function getId (): ? string
29+ public function getId (): string
3030 {
3131 return '2 ' ;
3232 }
@@ -49,7 +49,7 @@ public function getId(): ?string
4949 public function testPreUpdate (): void
5050 {
5151 $ context = new class extends Context {
52- public function getId (): ? string
52+ public function getId (): string
5353 {
5454 return '42 ' ;
5555 }
You can’t perform that action at this time.
0 commit comments