33namespace Bolt \tests \PackStream \v1 ;
44
55use Bolt \PackStream \v1 \Packer ;
6- use PHPUnit \ Framework \ TestCase ;
6+ use Exception ;
77
88/**
99 * Class PackerTest
1818 * @requires extension mbstring
1919 * @requires extension json
2020 */
21- class PackerTest extends TestCase
21+ class PackerTest extends \ Bolt \ tests \ATest
2222{
2323
2424 /**
@@ -37,7 +37,7 @@ public function test__construct(): Packer
3737 * @param string $bin
3838 * @param array $args
3939 * @param Packer $packer
40- * @throws \ Exception
40+ * @throws Exception
4141 */
4242 public function testPack (string $ bin , array $ args , Packer $ packer )
4343 {
@@ -62,7 +62,7 @@ public function packProvider(): array
6262 * @param string $bin
6363 * @param int $number
6464 * @param Packer $packer
65- * @throws \ Exception
65+ * @throws Exception
6666 */
6767 public function testPackInteger (string $ bin , int $ number , Packer $ packer )
6868 {
@@ -83,7 +83,7 @@ public function integerProvider(): array
8383 /**
8484 * @depends test__construct
8585 * @param Packer $packer
86- * @throws \ Exception
86+ * @throws Exception
8787 */
8888 public function testPackFloat (Packer $ packer )
8989 {
@@ -93,7 +93,7 @@ public function testPackFloat(Packer $packer)
9393 /**
9494 * @depends test__construct
9595 * @param Packer $packer
96- * @throws \ Exception
96+ * @throws Exception
9797 */
9898 public function testPackNull (Packer $ packer )
9999 {
@@ -103,7 +103,7 @@ public function testPackNull(Packer $packer)
103103 /**
104104 * @depends test__construct
105105 * @param Packer $packer
106- * @throws \ Exception
106+ * @throws Exception
107107 */
108108 public function testPackBool (Packer $ packer )
109109 {
@@ -117,7 +117,7 @@ public function testPackBool(Packer $packer)
117117 * @param string $bin
118118 * @param string $str
119119 * @param Packer $packer
120- * @throws \ Exception
120+ * @throws Exception
121121 */
122122 public function testPackString (string $ bin , string $ str , Packer $ packer )
123123 {
@@ -138,7 +138,7 @@ public function stringProvider(): array
138138 * @param string $bin
139139 * @param array $arr
140140 * @param Packer $packer
141- * @throws \ Exception
141+ * @throws Exception
142142 */
143143 public function testPackArray (string $ bin , array $ arr , Packer $ packer )
144144 {
@@ -162,9 +162,9 @@ public function arrayProvider(): array
162162 * @param string $bin
163163 * @param object $obj
164164 * @param Packer $packer
165- * @throws \ Exception
165+ * @throws Exception
166166 */
167- public function testPackMap (string $ bin , object $ obj , Packer $ packer )
167+ public function testPackMap (string $ bin , $ obj , Packer $ packer )
168168 {
169169 $ this ->assertEquals ($ bin , $ this ->getMethod ($ packer )->invoke ($ packer , $ obj ));
170170 }
@@ -184,12 +184,12 @@ public function mapProvider(): array
184184 * Test it on data type resource, which is not implemented
185185 * @depends test__construct
186186 * @param Packer $packer
187- * @throws \ Exception
187+ * @throws Exception
188188 */
189189 public function testException (Packer $ packer )
190190 {
191191 $ f = fopen (__FILE__ , 'r ' );
192- $ this ->expectException (\ Exception::class);
192+ $ this ->expectException (Exception::class);
193193 $ this ->getMethod ($ packer )->invoke ($ packer , $ f );
194194 fclose ($ f );
195195 }
0 commit comments