[pkg-php-pear] Bug#814858: Additional test fix for pkg-php-tools 1.32 (when using PHP7.0)
Nish Aravamudan
nish.aravamudan at canonical.com
Tue Feb 23 22:28:29 UTC 2016
Since php-json has been merged into php7.0 (as opposed to from
src:php-json with PHP5), I noticed that the error message in one of the
tests is incorrect.
* tests/PhpcomposerSourceTest.php: update php-json error message
Not-signed-off-by: Nishanth Aravamudan <nish.aravamudan at canonical.com>
---
Note that I know this isn't quite right, because now the test will fail
with PHP5 versions of php-json. I'm not quite sure how the test should
be fixed in this case, though -- should it have two functions with
different @requires? It seems like the phpunit @requires syntax implies
>= which doesn't work for specifying exact versions (or in this case
families, e.g. '@requires PHP 5'). I'm hoping someone with more
experience can provide the right syntax.
diff --git a/tests/PhpcomposerSourceTest.php b/tests/PhpcomposerSourceTest.php
index 0c65bad..23ef3a3 100644
--- a/tests/PhpcomposerSourceTest.php
+++ b/tests/PhpcomposerSourceTest.php
@@ -44,7 +44,7 @@ class PhpcomposerSourceTest extends PHPUnit_Framework_TestCase {
/**
* @expectedException InvalidArgumentException
- * @expectedExceptionMessage Error parsing composer.json: Syntax error, malformed JSON (quoted object property name expected)
+ * @expectedExceptionMessage Error parsing composer.json: Syntax error, malformed JSON (Syntax error)
*/
public function testBrokenOpen() {
// Open a directory with a broken composer.json
--
Nishanth Aravamudan
Ubuntu Server
Canonical Ltd
More information about the pkg-php-pear
mailing list