Browse Source

improve error message (fix #79)

pull/81/merge
Martin Monperrus 8 years ago
parent
commit
1bc1441a01
  1. 6
      bibtexbrowser-test.php

6
bibtexbrowser-test.php

@ -35,6 +35,9 @@ define('BIBTEXBROWSER_MAIN','Nothing');
//require_once('bibtexbrowser.php');
set_error_handler("exception_error_handler");
if (!is_file('reflectivedoc.php')) {
die("to run the bibtexbrowser tests, download this file first:\ncurl -L -o reflectivedoc.php https://www.monperrus.net/martin/reflectivedoc.php.txt\n");
}
require('reflectivedoc.php');
$nsnippet=0;
foreach(getAllSnippetsInFile('bibtexbrowser.php') as $snippet) {
@ -68,7 +71,8 @@ class BTBTest extends PHPUnit_Framework_TestCase {
function test_checkdoc() {
if(!is_file('gakowiki-syntax.php')) { return; }
if (!function_exists('gk_wiki2html')) { include('gakowiki-syntax.php'); }
create_wiki_parser()->parse(file_get_contents('bibtexbrowser-documentation.wiki'));
$result = create_wiki_parser()->parse(file_get_contents('bibtexbrowser-documentation.wiki'));
$this->assertEquals(1, strpos($result,"bibtexbrowser is a PHP script that creates publication lists from Bibtex files"));
}
function createDB() {

Loading…
Cancel
Save