fixes bug introduced by 8fe8c897f
This commit is contained in:
@@ -284,6 +284,19 @@ class BTBTest extends PHPUnit_Framework_TestCase {
|
|||||||
$result = $xml->xpath('//td[@class=\'bibref\']');
|
$result = $xml->xpath('//td[@class=\'bibref\']');
|
||||||
$this->assertEquals($PAGE_SIZE,count($result));
|
$this->assertEquals($PAGE_SIZE,count($result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function test_getKeywords() {
|
||||||
|
$bibtex = "@article{aKey,title={\`a Book},keywords={foo,bar},author={Martin Monperrus},publisher={Springer},year=2009,pages={42--4242},number=1}\n";
|
||||||
|
|
||||||
|
bibtexbrowser_configure('BIBTEXBROWSER_USE_LATEX2HTML', true);
|
||||||
|
$test_data = fopen('php://memory','x+');
|
||||||
|
fwrite($test_data, $bibtex);
|
||||||
|
fseek($test_data,0);
|
||||||
|
$db = new BibDataBase();
|
||||||
|
$db->update_internal("inline", $test_data);
|
||||||
|
$dis = $db->getEntryByKey('aKey');
|
||||||
|
$this->assertEquals(2,count($dis->getKeywords()));
|
||||||
|
}
|
||||||
} // end class
|
} // end class
|
||||||
|
|
||||||
?>
|
?>
|
||||||
+1
-1
@@ -1492,7 +1492,7 @@ class BibEntry {
|
|||||||
|
|
||||||
/** returns the array of keywords */
|
/** returns the array of keywords */
|
||||||
function getKeywords() {
|
function getKeywords() {
|
||||||
return preg_split('/[,;\\/]/', $bib->getField("keywords"));
|
return preg_split('/[,;\\/]/', $this->getField("keywords"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Returns the value of the given field? */
|
/** Returns the value of the given field? */
|
||||||
|
|||||||
Reference in New Issue
Block a user