From 303c14a842974e673d8717d14a9d060083803c68 Mon Sep 17 00:00:00 2001 From: sc0Vu Date: Tue, 19 Dec 2017 16:15:17 +0800 Subject: [PATCH] PersonalBatchTest --- test/unit/PersonalBatchTest.php | 50 +++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 test/unit/PersonalBatchTest.php diff --git a/test/unit/PersonalBatchTest.php b/test/unit/PersonalBatchTest.php new file mode 100644 index 0000000..281c9c9 --- /dev/null +++ b/test/unit/PersonalBatchTest.php @@ -0,0 +1,50 @@ +personal = $this->web3->personal; + } + + /** + * testBatch + * + * @return void + */ + public function testBatch() + { + $personal = $this->personal; + + $personal->batch(true); + $personal->listAccounts(); + $personal->newAccount('123456'); + + $personal->provider->execute(function ($err, $data) { + if ($err !== null) { + return $this->assertTrue($err->getCode() === 405); + } + $this->assertTrue(is_array($data[0]->result)); + $this->assertTrue(is_string($data[1]->result)); + }); + } +} \ No newline at end of file