Browse Source

fixed most of indenting and trailing spaces per PSR-2 standard as well as moving trailing spaces from text documents

pull/85/head
Chris 8 years ago
parent
commit
f87987e1c9
  1. 13
      .editorconfig
  2. 16
      bibtexbrowser-test.php
  3. 1396
      bibtexbrowser.php

13
.editorconfig

@ -0,0 +1,13 @@
root = true
; applies to all files
[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
; applies only to PHP files
[**.php]
indent_style = space
indent_size = 4

16
bibtexbrowser-test.php

@ -1,13 +1,13 @@
<?php
/** PhPUnit tests for bibtexbrowser
To run them:
$ phpunit bibtexbrowser-test.php
To run them:
$ phpunit bibtexbrowser-test.php
With coverage:
$ phpunit --coverage-html ./coverage btb-test.php
With coverage:
$ phpunit --coverage-html ./coverage btb-test.php
(be sure that xdebug is enabled: /etc/php5/cli/conf.d# ln -s ../../mods-available/xdebug.ini)
(be sure that xdebug is enabled: /etc/php5/cli/conf.d# ln -s ../../mods-available/xdebug.ini)
*/
// backward compatibility
@ -245,7 +245,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
fseek($test_data,0);
$btb = new BibDataBase();
$btb->update_internal("inline", $test_data);
// print_r($btb->stringdb);
// print_r($btb->stringdb);
$this->assertEquals(1,count($btb->stringdb));
// replacing the existing one
@ -256,7 +256,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
fseek($test_data,0);
$btb = new BibDataBase();
$btb->update_internal("inline2", $test_data);
// print_r($btb->stringdb);
// print_r($btb->stringdb);
$this->assertEquals(1,count($btb->stringdb));
$this->assertEquals("2009",$btb->stringdb['x']->value);//
@ -331,7 +331,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
$btb = new BibDataBase();
$btb->update_internal("inline", $test_data);
$first_entry=$btb->bibdb[array_keys($btb->bibdb)[0]];
// $this->assertTrue(strpos('A Book{} $\mbox{foo}$',$first_entry->toHTML());
// $this->assertTrue(strpos('A Book{} $\mbox{foo}$',$first_entry->toHTML());
$this->assertEquals('A Book $\mbox{foo}$ tt $\boo{t}$',$first_entry->getTitle());
}

1396
bibtexbrowser.php
File diff suppressed because it is too large
View File

Loading…
Cancel
Save