@@ -55,18 +55,18 @@ public function setUp()
55
55
public function testReadBinaryValue ()
56
56
{
57
57
$ binary = $ this ->binaryProperty ->getBinary ();
58
- $ this ->assertTrue ( is_resource ( $ binary) );
58
+ $ this ->assertInternalType ( ' resource ' , $ binary );
59
59
$ this ->assertEquals ($ this ->decodedstring , stream_get_contents ($ binary ));
60
60
61
61
// stream must start when getting again
62
62
$ binary = $ this ->binaryProperty ->getBinary ();
63
- $ this ->assertTrue ( is_resource ( $ binary) );
63
+ $ this ->assertInternalType ( ' resource ' , $ binary );
64
64
$ this ->assertEquals ($ this ->decodedstring , stream_get_contents ($ binary ), 'Stream must begin at start again on second read ' );
65
65
66
66
// stream must not be the same
67
67
fclose ($ binary );
68
68
$ binary = $ this ->binaryProperty ->getBinary ();
69
- $ this ->assertTrue ( is_resource ( $ binary) );
69
+ $ this ->assertInternalType ( ' resource ' , $ binary );
70
70
$ this ->assertEquals ($ this ->decodedstring , stream_get_contents ($ binary ), 'Stream must be different for each call, fclose should not matter ' );
71
71
}
72
72
@@ -100,7 +100,7 @@ public function testReadBinaryValues()
100
100
$ vals = $ binaryMulti ->getValue ();
101
101
$ this ->assertInternalType ('array ' , $ vals );
102
102
foreach ($ vals as $ value ) {
103
- $ this ->assertTrue ( is_resource ( $ value) );
103
+ $ this ->assertInternalType ( ' resource ' , $ value );
104
104
$ this ->assertEquals ($ this ->decodedstring , stream_get_contents ($ value ));
105
105
}
106
106
}
@@ -161,8 +161,8 @@ public function testReadEmptyBinaryMultivalue()
161
161
$ empty = $ node ->getProperty ('empty_multidata ' );
162
162
$ this ->assertEquals (PropertyType::BINARY , $ empty ->getType ());
163
163
$ emptyValue = $ empty ->getBinary ();
164
- $ this ->assertTrue ( is_array ( $ emptyValue) );
165
- $ this ->assertTrue ( count ( $ emptyValue) === 0 );
164
+ $ this ->assertInternalType ( ' array ' , $ emptyValue );
165
+ $ this ->assertCount ( 0 , $ emptyValue );
166
166
}
167
167
168
168
/**
@@ -174,8 +174,8 @@ public function testReadSingleBinaryMultivalue()
174
174
$ single = $ node ->getProperty ('single_multidata ' );
175
175
$ this ->assertEquals (PropertyType::BINARY , $ single ->getType ());
176
176
$ singleValue = $ single ->getBinary ();
177
- $ this ->assertTrue ( is_array ( $ singleValue) );
178
- $ this ->assertTrue ( is_resource ( $ singleValue [0 ]) );
177
+ $ this ->assertInternalType ( ' array ' , $ singleValue );
178
+ $ this ->assertInternalType ( ' resource ' , $ singleValue [0 ]);
179
179
$ contents = stream_get_contents ($ singleValue [0 ]);
180
180
$ this ->assertEquals ($ this ->decodedstring , $ contents );
181
181
}
0 commit comments