28
28
29
29
class LaminasViewRendererTest extends TestCase
30
30
{
31
- /** @var TemplatePathStack */
32
- private $ resolver ;
33
-
34
- /** @var PhpRenderer */
35
- private $ render ;
31
+ private PhpRenderer $ render ;
36
32
37
33
protected function setUp (): void
38
34
{
39
- $ this -> resolver = new TemplatePathStack ();
40
- $ this ->render = new PhpRenderer ();
41
- $ this ->render ->setResolver ($ this -> resolver );
35
+ $ resolver = new TemplatePathStack ();
36
+ $ this ->render = new PhpRenderer ();
37
+ $ this ->render ->setResolver ($ resolver );
42
38
}
43
39
44
40
public function assertTemplatePath (string $ path , TemplatePath $ templatePath , ?string $ message = null ): void
@@ -113,6 +109,7 @@ public function testInstantiatingWithInvalidLayout(): void
113
109
$ this ->expectException (InvalidArgumentException::class);
114
110
$ this ->expectExceptionMessage ('Layout must be a string layout template name ' );
115
111
112
+ /** @psalm-suppress InvalidArgument */
116
113
new LaminasViewRenderer (null , []);
117
114
}
118
115
@@ -121,7 +118,6 @@ public function testCanAddPathWithEmptyNamespace(): void
121
118
$ renderer = new LaminasViewRenderer ();
122
119
$ renderer ->addPath (__DIR__ . '/TestAsset ' );
123
120
$ paths = $ renderer ->getPaths ();
124
- $ this ->assertIsArray ($ paths );
125
121
$ this ->assertCount (1 , $ paths );
126
122
$ this ->assertTemplatePath (__DIR__ . '/TestAsset ' . DIRECTORY_SEPARATOR , $ paths [0 ]);
127
123
$ this ->assertTemplatePathString (__DIR__ . '/TestAsset ' . DIRECTORY_SEPARATOR , $ paths [0 ]);
@@ -133,7 +129,6 @@ public function testCanAddPathWithNamespace(): void
133
129
$ renderer = new LaminasViewRenderer ();
134
130
$ renderer ->addPath (__DIR__ . '/TestAsset ' , 'test ' );
135
131
$ paths = $ renderer ->getPaths ();
136
- $ this ->assertIsArray ($ paths );
137
132
$ this ->assertCount (1 , $ paths );
138
133
$ this ->assertTemplatePath (__DIR__ . '/TestAsset ' . DIRECTORY_SEPARATOR , $ paths [0 ]);
139
134
$ this ->assertTemplatePathString (__DIR__ . '/TestAsset ' . DIRECTORY_SEPARATOR , $ paths [0 ]);
0 commit comments