@@ -13,7 +13,7 @@ class ArrayValuesNormalizerRendererTest extends TestCase
1313
1414 private $ defaultSeparator ;
1515
16- public function testRenderer ()
16+ public function testRenderer (): void
1717 {
1818 $ data = [
1919 'foo ' => 'bar ' ,
@@ -41,7 +41,7 @@ public function testRenderer()
4141 $ this ->assertEquals ('foo=bar&sort[bar]=desc&sort[foo]=asc&filters[foo][]=bar&filters[foo][]=baz&filters[bar][]=foo bar ' , urldecode ($ qs ->withRenderer ($ renderer ->withEncoding (PHP_QUERY_RFC1738 ))));
4242 }
4343
44- public function testRendererOnlyAffectsKeys ()
44+ public function testRendererOnlyAffectsKeys (): void
4545 {
4646 $ data = [
4747 'foo ' => [
@@ -52,7 +52,7 @@ public function testRendererOnlyAffectsKeys()
5252 $ this ->assertEquals ('foo%5B%5D=bar%20baz%5B0%5D ' , (string ) $ qs ->withRenderer (withoutNumericIndices ()));
5353 }
5454
55- public function testChangeEncoding ()
55+ public function testChangeEncoding (): void
5656 {
5757 $ renderer = ArrayValuesNormalizerRenderer::factory ();
5858 $ this ->assertNotSame ($ renderer ->withEncoding ($ renderer ->getEncoding ()), $ renderer );
@@ -62,7 +62,7 @@ public function testChangeEncoding()
6262 $ this ->assertEquals (PHP_QUERY_RFC1738 , $ renderer ->getEncoding ());
6363 }
6464
65- public function testChangeSeparator ()
65+ public function testChangeSeparator (): void
6666 {
6767
6868 ini_set ('arg_separator.output ' , '~ ' );
@@ -83,23 +83,21 @@ public function testChangeSeparator()
8383 ini_set ('arg_separator.output ' , $ this ->defaultSeparator );
8484 }
8585
86- /**
87- * @expectedException \RuntimeException
88- */
89- public function testBlankSeparator ()
86+ public function testBlankSeparator (): void
9087 {
88+ $ this ->expectException (\RuntimeException::class);
9189 $ qs = query_string (['foo ' => 'bar ' , 'bar ' => 'baz ' ]);
9290 $ renderer = ArrayValuesNormalizerRenderer::factory ();
9391 $ renderer = $ renderer ->withSeparator ('' ); // Blank separator
9492 $ renderer ->render ($ qs );
9593 }
9694
97- public function setUp ()
95+ public function setUp (): void
9896 {
9997 $ this ->defaultSeparator = ini_get ('arg_separator.output ' );
10098 }
10199
102- public function tearDown ()
100+ public function tearDown (): void
103101 {
104102 ini_set ('arg_separator.output ' , $ this ->defaultSeparator );
105103 }
0 commit comments