Skip to content

Commit 562fa55

Browse files
committed
Add return typehints to test methods
1 parent 972bc0e commit 562fa55

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

tests/PhpRendererTest.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515

1616
class PhpRendererTest extends TestCase
1717
{
18-
19-
public function testRenderer()
18+
public function testRenderer(): void
2019
{
2120
$renderer = new PhpRenderer(__DIR__ . '/_files/');
2221

@@ -31,7 +30,7 @@ public function testRenderer()
3130
$this->assertEquals('Hi', $newResponse->getBody()->getContents());
3231
}
3332

34-
public function testRenderConstructor()
33+
public function testRenderConstructor(): void
3534
{
3635
$renderer = new PhpRenderer(__DIR__ . '/_files');
3736

@@ -46,7 +45,7 @@ public function testRenderConstructor()
4645
$this->assertEquals('Hi', $newResponse->getBody()->getContents());
4746
}
4847

49-
public function testAttributeMerging()
48+
public function testAttributeMerging(): void
5049
{
5150

5251
$renderer = new PhpRenderer(__DIR__ . '/_files/', [
@@ -64,7 +63,7 @@ public function testAttributeMerging()
6463
$this->assertEquals('Hi', $newResponse->getBody()->getContents());
6564
}
6665

67-
public function testExceptionInTemplate()
66+
public function testExceptionInTemplate(): void
6867
{
6968
$renderer = new PhpRenderer(__DIR__ . '/_files/');
7069

@@ -86,7 +85,7 @@ public function testExceptionInTemplate()
8685
$this->assertEquals('Hi', $newResponse->getBody()->getContents());
8786
}
8887

89-
public function testExceptionForTemplateInData()
88+
public function testExceptionForTemplateInData(): void
9089
{
9190
$renderer = new PhpRenderer(__DIR__ . '/_files/');
9291

@@ -100,7 +99,7 @@ public function testExceptionForTemplateInData()
10099
]);
101100
}
102101

103-
public function testTemplateNotFound()
102+
public function testTemplateNotFound(): void
104103
{
105104
$renderer = new PhpRenderer(__DIR__ . '/_files/');
106105

@@ -112,7 +111,7 @@ public function testTemplateNotFound()
112111
$renderer->render($response, 'adfadftemplate.phtml', []);
113112
}
114113

115-
public function testLayout()
114+
public function testLayout(): void
116115
{
117116
$renderer = new PhpRenderer(__DIR__ . '/_files/', ['title' => 'My App']);
118117
$renderer->setLayout('layout.phtml');
@@ -129,7 +128,7 @@ public function testLayout()
129128
. '</footer></body></html>', $newResponse->getBody()->getContents());
130129
}
131130

132-
public function testLayoutConstructor()
131+
public function testLayoutConstructor(): void
133132
{
134133
$renderer = new PhpRenderer(__DIR__ . '/_files', ['title' => 'My App'], 'layout.phtml');
135134

@@ -145,7 +144,7 @@ public function testLayoutConstructor()
145144
. '</footer></body></html>', $newResponse->getBody()->getContents());
146145
}
147146

148-
public function testExceptionInLayout()
147+
public function testExceptionInLayout(): void
149148
{
150149
$renderer = new PhpRenderer(__DIR__ . '/_files/');
151150
$renderer->setLayout('exception_layout.phtml');
@@ -169,14 +168,14 @@ public function testExceptionInLayout()
169168
$this->assertEquals('Hi', $newResponse->getBody()->getContents());
170169
}
171170

172-
public function testLayoutNotFound()
171+
public function testLayoutNotFound(): void
173172
{
174173
$renderer = new PhpRenderer(__DIR__ . '/_files/');
175174
$this->expectException(RuntimeException::class);
176175
$renderer->setLayout('non-existent_layout.phtml');
177176
}
178177

179-
public function testContentDataKeyShouldBeIgnored()
178+
public function testContentDataKeyShouldBeIgnored(): void
180179
{
181180
$renderer = new PhpRenderer(__DIR__ . '/_files/');
182181
$renderer->setLayout('layout.phtml');

0 commit comments

Comments
 (0)