[geos-commits] r3706 - in branches/3.3: . php php/test
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Sep 6 11:05:59 PDT 2012
Author: strk
Date: 2012-09-06 11:05:59 -0700 (Thu, 06 Sep 2012)
New Revision: 3706
Modified:
branches/3.3/NEWS
branches/3.3/php/README
branches/3.3/php/test/test.php
Log:
Add support for phpunit 3.6 (not loosing support for 3.4)
I don't have phpunit-3.4 anymore so if anyone does please see
if "make check" still works (with php enabled)
NOTE: Ubuntu 10.04 ships phpunit 3.4
Modified: branches/3.3/NEWS
===================================================================
--- branches/3.3/NEWS 2012-07-27 08:09:11 UTC (rev 3705)
+++ branches/3.3/NEWS 2012-09-06 18:05:59 UTC (rev 3706)
@@ -2,6 +2,7 @@
YYYY-MM-DD
- Bug fixes / improvements
+ - Add support for testing with phpunit 3.6 (not loosing support for 3.4)
Changes in 3.3.5
2012-06-25
Modified: branches/3.3/php/README
===================================================================
--- branches/3.3/php/README 2012-07-27 08:09:11 UTC (rev 3705)
+++ branches/3.3/php/README 2012-09-06 18:05:59 UTC (rev 3706)
@@ -28,6 +28,11 @@
You can still run 'make check' from this dir for
localized (php-only) testing.
+Note that you'll need phpunit installed for this to work.
+To install:
+
+ sudo pear install --force --alldeps phpunit/phpunit
+
INSTALL
-------
Modified: branches/3.3/php/test/test.php
===================================================================
--- branches/3.3/php/test/test.php 2012-07-27 08:09:11 UTC (rev 3705)
+++ branches/3.3/php/test/test.php 2012-09-06 18:05:59 UTC (rev 3706)
@@ -5,11 +5,21 @@
dl("geos.so");
-require_once 'PHPUnit/Framework.php';
+$phpunit_versions = explode('.', PHPUnit_Runner_Version::id());
+$phpunit_version = $phpunit_versions[0] . $phpunit_versions[1];
+if ( $phpunit_version < 36 ) require_once 'PHPUnit/Framework.php';
class test extends PHPUnit_Framework_TestCase
{
+ # This method override is needed to support phpunit < 3.5 (Ubuntu 10.04 ships 3.4)
+ static public function assertType($x, $y)
+ {
+ global $phpunit_version;
+ if ( $phpunit_version < 35 ) return PHPUnit_Framework_TestCase::assertType($x, $y);
+ else return PHPUnit_Framework_TestCase::assertInternalType($x, $y);
+ }
+
public function testGEOSVersion()
{
$this->assertContains('-CAPI-', GEOSVersion());
More information about the geos-commits
mailing list