-
Notifications
You must be signed in to change notification settings - Fork 0
/
human-test.php
30 lines (28 loc) · 1.23 KB
/
human-test.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
function test($v) {
var_dump($v);
}
require_once 'lib/Pincaster.php';
$client = new PincasterClient('localhost', 4269);
$layer = $client->layer('restaurants');
$layer->delete();
$layer->register();
test($client->layers());
test($layer->set('info', array('secret_key' => 'supersecret', 'last_update' => '2001/07/08')));
// // or test($layer->set('info', 'secret_key=supersecret&last_update=2001/07/08'));
test($layer->get('info'));
test($layer->set('abcd', array('_loc' => '48.512,2.243')));
test($layer->get('abcd'));
test($layer->set('abcd', array('_loc' => '48.512,2.243')));
// // or test($layer->set('abcd', 'name=MacDonalds&closed=1&address=blabla&visits=100000')));
test($layer->get('abcd'));
test($layer->set('abcd', array('_delete:closed' => 1, 'closed' => '1', '_add_int:visits' => 127)));
// // or test($layer->set('abcd', '_delete:closed=1&_add_int:visits=127')));
test($layer->searchNear('48.510,2.240', 7000));
// // with limit 100 test($layer->searchNear('48.510,2.240', 7000, 100));
// // without properties test($layer->searchNear('48.510,2.240', 7000, NULL, FALSE));
test($layer->searchIn('48.000,2.000,49.000,3.000', NULL, FALSE));
test($client->ping());
// test($client->rewrite());
test($client->shutdown());
// test($client->ping());