Skip to content

Commit a7c56aa

Browse files
committed
rpc tests: assertInternalType deprecated fix
1 parent ef19212 commit a7c56aa

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

tests-rpc/RbfTransactionTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function __construct($name = null, array $data = [], $dataName = '')
3535

3636
private function assertSendRawTransaction($result)
3737
{
38-
$this->assertInternalType('array', $result);
38+
$this->assertIsArray($result);
3939
$this->assertArrayHasKey('error', $result);
4040
$this->assertEquals(null, $result['error']);
4141

@@ -45,9 +45,9 @@ private function assertSendRawTransaction($result)
4545

4646
private function assertBitcoindError($errorCode, $result)
4747
{
48-
$this->assertInternalType('array', $result);
48+
$this->assertIsArray($result);
4949
$this->assertArrayHasKey('error', $result);
50-
$this->assertInternalType('array', $result['error']);
50+
$this->assertIsArray($result['error']);
5151
$this->assertEquals($errorCode, $result['error']['code']);
5252

5353
$this->assertArrayHasKey('error', $result);

tests-rpc/ServerTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function testIfRegtest()
3030
$server = $this->rpcFactory->startBitcoind();
3131

3232
$result = $server->makeRpcRequest("getblockchaininfo");
33-
$this->assertInternalType('array', $result);
33+
$this->assertIsArray($result);
3434
$this->assertArrayHasKey('result', $result);
3535
$this->assertArrayHasKey('chain', $result['result']);
3636
$this->assertEquals('regtest', $result['result']['chain']);
@@ -44,12 +44,12 @@ public function testStartStop()
4444

4545
// First bitcoind, generate block
4646
$result = $bitcoind->request("generate", [1]);
47-
$this->assertInternalType("array", $result['result']);
47+
$this->assertIsArray($result['result']);
4848
$this->assertEquals(64, strlen($result['result'][0]));
4949

5050
// First bitcoind, get block height - 1
5151
$info = $bitcoind->request("getblockchaininfo");
52-
$this->assertInternalType("array", $info['result']);
52+
$this->assertIsArray($info['result']);
5353
$this->assertEquals(1, $info['result']['blocks']);
5454

5555
// Destroy that instance
@@ -60,7 +60,7 @@ public function testStartStop()
6060
$bitcoind = $this->rpcFactory->startBitcoind();
6161

6262
$info = $bitcoind->request("getblockchaininfo");
63-
$this->assertInternalType("array", $info['result']);
63+
$this->assertIsArray($info['result']);
6464
$this->assertEquals(0, $info['result']['blocks']);
6565

6666
$bitcoind->destroy();

0 commit comments

Comments
 (0)