@@ -37,6 +37,10 @@ public function setUp()
37
37
$ this ->collectionHandler ->add ($ this ->collection );
38
38
39
39
$ this ->documentHandler = new DocumentHandler ($ this ->connection );
40
+
41
+ $ adminHandler = new AdminHandler ($ this ->connection );
42
+ $ version = preg_replace ("/-[a-z0-9]+$/ " , "" , $ adminHandler ->getServerVersion ());
43
+ $ this ->hasExportApi = (version_compare ($ version , '2.6.0 ' ) >= 0 );
40
44
}
41
45
42
46
@@ -45,6 +49,9 @@ public function setUp()
45
49
*/
46
50
public function testExportEmpty ()
47
51
{
52
+ if (! $ this ->hasExportApi ) {
53
+ return ;
54
+ }
48
55
$ connection = $ this ->connection ;
49
56
50
57
$ export = new Export ($ connection , $ this ->collection , array ());
@@ -67,6 +74,9 @@ public function testExportEmpty()
67
74
*/
68
75
public function testExportDocuments ()
69
76
{
77
+ if (! $ this ->hasExportApi ) {
78
+ return ;
79
+ }
70
80
$ connection = $ this ->connection ;
71
81
for ($ i = 0 ; $ i < 100 ; ++$ i ) {
72
82
$ this ->documentHandler ->save ($ this ->collection , array ("value " => $ i ));
@@ -90,6 +100,9 @@ public function testExportDocuments()
90
100
*/
91
101
public function testExportDocumentsTwoFetches ()
92
102
{
103
+ if (! $ this ->hasExportApi ) {
104
+ return ;
105
+ }
93
106
$ connection = $ this ->connection ;
94
107
$ statement = new Statement ($ connection , array (
95
108
"query " => "FOR i IN 1..1001 INSERT { _key: CONCAT('test', i), value: i } IN " . $ this ->collection ->getName ()
@@ -115,6 +128,9 @@ public function testExportDocumentsTwoFetches()
115
128
*/
116
129
public function testExportDocumentsMultipleFetches ()
117
130
{
131
+ if (! $ this ->hasExportApi ) {
132
+ return ;
133
+ }
118
134
$ connection = $ this ->connection ;
119
135
$ statement = new Statement ($ connection , array (
120
136
"query " => "FOR i IN 1..5000 INSERT { _key: CONCAT('test', i), value: i } IN " . $ this ->collection ->getName ()
@@ -141,6 +157,9 @@ public function testExportDocumentsMultipleFetches()
141
157
*/
142
158
public function testExportDocumentsWithSmallBatchSize ()
143
159
{
160
+ if (! $ this ->hasExportApi ) {
161
+ return ;
162
+ }
144
163
$ connection = $ this ->connection ;
145
164
$ statement = new Statement ($ connection , array (
146
165
"query " => "FOR i IN 1..5000 INSERT { _key: CONCAT('test', i), value: i } IN " . $ this ->collection ->getName ()
0 commit comments