File: 022.solrdocument_getInputDocument.phpt

package info (click to toggle)
php-solr 2.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,620 kB
  • sloc: ansic: 14,274; xml: 1,313; php: 1,239; pascal: 11; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (8)
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
--TEST--
SolrDocument::getInputDocument() - creating SolrInputDocument from SolrDocument
--FILE--
<?php

require_once "bootstrap.inc";

$doc = new SolrDocument();

$doc->addField('id', 1123);

$doc->features = "PHP Client Side";
$doc->features = "Fast development cycles";

$doc['cat'] = 'Software';
$doc['cat'] = 'Custom Search';
$doc->cat   = 'Information Technology';


$input_doc = $doc->getInputDocument();

var_dump(get_class($input_doc));

?>
--EXPECT--
string(17) "SolrInputDocument"