File tree 3 files changed +23
-4
lines changed
3 files changed +23
-4
lines changed Original file line number Diff line number Diff line change 1
1
CHANGES
2
2
3
+ 2013-12-01
4
+ - Issue #501 resolved
5
+
3
6
2013-11-23
4
7
- Release v0.90.7.0
5
8
Original file line number Diff line number Diff line change @@ -119,14 +119,14 @@ public function hasType()
119
119
*/
120
120
public function getPath ()
121
121
{
122
- $ path = '/ ' ;
122
+ $ path = '' ;
123
123
if ($ this ->hasIndex ()) {
124
- $ path .= $ this ->getIndex () . '/ ' ;
124
+ $ path .= $ this ->getIndex () . '/ ' ;
125
125
if ($ this ->hasType ()) {
126
- $ path .= $ this ->getType () . '/ ' ;
126
+ $ path .= $ this ->getType () . '/ ' ;
127
127
}
128
128
}
129
- $ path .= '_bulk ' ;
129
+ $ path .= '_bulk ' ;
130
130
return $ path ;
131
131
}
132
132
Original file line number Diff line number Diff line change @@ -527,6 +527,22 @@ public function testUpdate()
527
527
528
528
$ index ->delete ();
529
529
}
530
+
531
+ public function testGetPath () {
532
+ $ client = $ this ->_getClient ();
533
+ $ bulk = new Bulk ($ client );
534
+
535
+ $ this ->assertEquals ('_bulk ' , $ bulk ->getPath ());
536
+
537
+ $ indexName = 'testIndex ' ;
538
+
539
+ $ bulk ->setIndex ($ indexName );
540
+ $ this ->assertEquals ($ indexName . '/_bulk ' , $ bulk ->getPath ());
541
+
542
+ $ typeName = 'testType ' ;
543
+ $ bulk ->setType ($ typeName );
544
+ $ this ->assertEquals ($ indexName . '/ ' . $ typeName . '/_bulk ' , $ bulk ->getPath ());
545
+ }
530
546
531
547
public function udpDataProvider ()
532
548
{
You can’t perform that action at this time.
0 commit comments