@@ -79,6 +79,7 @@ public function getCapabilities($db)
79
79
public function seedDatabase ($ db , $ capabilities )
80
80
{
81
81
$ fixture = __DIR__ .'/data/blog_mysql.sql ' ;
82
+
82
83
$ contents = file_get_contents ($ fixture );
83
84
84
85
if (!($ capabilities & self ::GIS )) {
@@ -98,121 +99,4 @@ public function seedDatabase($db, $capabilities)
98
99
die ("Loading ' $ fixture' failed on statemement # $ i with error: \n" .mysqli_error ($ db )."\n" );
99
100
}
100
101
}
101
-
102
- /**
103
- * Gets the path to the seed file based on the version of MySQL
104
- *
105
- * @return string
106
- */
107
- protected static function getSeedFile ()
108
- {
109
- if (static ::$ mysql_version >= self ::MYSQL_57 ) {
110
- return __DIR__ .'/data/blog_ ' .strtolower (static ::$ config ['dbengine ' ]).'_57.sql ' ;
111
- } elseif (static ::$ mysql_version >= self ::MYSQL_56 ) {
112
- return __DIR__ .'/data/blog_ ' .strtolower (static ::$ config ['dbengine ' ]).'_56.sql ' ;
113
- }
114
- return __DIR__ .'/data/blog_ ' .strtolower (static ::$ config ['dbengine ' ]).'_55.sql ' ;
115
- }
116
-
117
- public function testHidingPasswordColumn ()
118
- {
119
- parent ::testHidingPasswordColumn ();
120
- }
121
-
122
- public function testMissingIntermediateTable ()
123
- {
124
- $ test = new API ($ this , static ::$ config );
125
- $ test ->get ('/users?include=posts,tags ' );
126
- $ test ->expect ('{"users":{"columns":["id","username","location"],"records":[[1,"user1",null]]},"posts":{"relations":{"user_id":"users.id"},"columns":["id","user_id","category_id","content"],"records":[[1,1,1,"blog started"],[2,1,2,"It works!"]]},"post_tags":{"relations":{"post_id":"posts.id"},"columns":["id","post_id","tag_id"],"records":[[1,1,1],[2,1,2],[3,2,1],[4,2,2]]},"tags":{"relations":{"id":"post_tags.tag_id"},"columns":["id","name"],"records":[[1,"funny"],[2,"important"]]}} ' );
127
- }
128
-
129
- public function testEditUserPassword ()
130
- {
131
- parent ::testEditUserPassword ();
132
- }
133
-
134
- public function testEditUserLocation ()
135
- {
136
- parent ::testEditUserLocation ();
137
- }
138
-
139
- public function testListUserLocations ()
140
- {
141
- parent ::testListUserLocations ();
142
- }
143
-
144
- public function testEditUserWithId ()
145
- {
146
- parent ::testEditUserWithId ();
147
- }
148
-
149
- public function testReadOtherUser ()
150
- {
151
- parent ::testReadOtherUser ();
152
- }
153
-
154
- public function testEditOtherUser ()
155
- {
156
- parent ::testEditOtherUser ();
157
- }
158
-
159
- public function testSpatialFilterWithin ()
160
- {
161
- if (static ::$ mysql_version < self ::MYSQL_56 ) {
162
- $ this ->markTestSkipped ("MySQL < 5.6 does not support JSON fields. " );
163
- }
164
- parent ::testSpatialFilterWithin ();
165
- }
166
-
167
-
168
- public function testListProductsProperties ()
169
- {
170
- if (static ::$ mysql_version < self ::MYSQL_57 ) {
171
- $ this ->markTestSkipped ("MySQL < 5.7 does not support JSON fields. " );
172
- }
173
- parent ::testListProductsProperties ();
174
- }
175
-
176
- public function testReadProductProperties ()
177
- {
178
- if (static ::$ mysql_version < self ::MYSQL_57 ) {
179
- $ this ->markTestSkipped ("MySQL < 5.7 does not support JSON fields. " );
180
- }
181
- parent ::testReadProductProperties ();
182
- }
183
-
184
- public function testWriteProductProperties ()
185
- {
186
- if (static ::$ mysql_version < self ::MYSQL_57 ) {
187
- $ this ->markTestSkipped ("MySQL < 5.7 does not support JSON fields. " );
188
- }
189
- parent ::testWriteProductProperties ();
190
- }
191
-
192
- public function testListProducts ()
193
- {
194
- parent ::testListProducts ();
195
- }
196
-
197
- public function testAddProducts ()
198
- {
199
- if (static ::$ mysql_version < self ::MYSQL_57 ) {
200
- $ this ->markTestSkipped ("MySQL < 5.7 does not support JSON fields. " );
201
- }
202
- parent ::testAddProducts ();
203
- }
204
-
205
- public function testSoftDeleteProducts ()
206
- {
207
- if (static ::$ mysql_version < self ::MYSQL_57 ) {
208
- $ test = new API ($ this , static ::$ config );
209
- $ test ->delete ('/products/1 ' );
210
- $ test ->expect ('1 ' );
211
- $ test ->get ('/products?columns=id,deleted_at ' );
212
- $ test ->expect ('{"products":{"columns":["id","deleted_at"],"records":[[1,"2013-12-11 11:10:09"]]}} ' );
213
- } else {
214
- parent ::testSoftDeleteProducts ();
215
- }
216
- }
217
-
218
102
}
0 commit comments