From ff75f486de4ba6512f97e2dd6499b3b5a072a5b7 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 31 Jan 2018 19:44:43 -0500 Subject: [PATCH] fix broken test for travis --- .travis.yml | 2 +- src/Bibliography.php | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8fb8394..11abd61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,6 @@ php: script: - curl -L -o reflectivedoc.php https://www.monperrus.net/martin/reflectivedoc.php.txt - curl -L -o gakowiki-syntax.php https://www.monperrus.net/martin/gakowiki-syntax.php.txt - - phpunit bibtexbrowser-test.php + - phpunit tests/bibtexbrowser-test.php sudo: false diff --git a/src/Bibliography.php b/src/Bibliography.php index 00e4ede..f1f9c8a 100644 --- a/src/Bibliography.php +++ b/src/Bibliography.php @@ -12,16 +12,11 @@ class Bibliography "library" => null, "academic" => null); - private $config = array(); - public function __construct($userConfig = array()) { // (PHP 5 >= 5.3.0, PHP 7) - $this->config = array_replace($this->defaultConfig, $userConfig); - - if (!isset($_GET['bib'])) { - $_GET['bib'] = $this->config['bib']; - } + // $userConfig precedent over defaultConfig; $_GET over $userConfig + $_GET = array_replace($this->defaultConfig, $userConfig, $_GET); } public function print()