Skip to content

Commit

Permalink
Changed testWrongClusterID to works with orient db versions < 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ostico committed Mar 7, 2015
1 parent 6eae04a commit f963d1d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions tests/PhpOrient/SQLCommandsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ public function testNullValueHandling(){

$record = $client->recordLoad($tmp->getRid())[0];

print_r($record->getOData());
$this->assertEquals( 'record di prova', $record->getOData()['aString'] );
$this->assertEquals( null, $record->getOData()['prova1'] );

// print_r($record->getOData());

} catch (\Exception $e) {
echo $e . "\n";
Expand All @@ -204,8 +207,13 @@ public function testWrongClusterID(){
* @var Record[] $records
*/
foreach ($records as $k => $rec) {

if ( $client->getTransport()->getProtocolVersion() < 26 )
$this->assertEquals( $k +1, $rec->getRid()->position );
else
$this->assertEquals( $k, $rec->getRid()->position );

$this->assertEquals( -2, $rec->getRid()->cluster );
$this->assertEquals( $k, $rec->getRid()->position );
}
}

Expand Down

0 comments on commit f963d1d

Please sign in to comment.