[geos-commits] r3708 - in trunk/php: . test
svn_geos at osgeo.org
svn_geos at osgeo.org
Thu Sep 6 11:22:54 PDT 2012
Author: strk
Date: 2012-09-06 11:22:53 -0700 (Thu, 06 Sep 2012)
New Revision: 3708
Modified:
trunk/php/README
trunk/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: trunk/php/README
===================================================================
--- trunk/php/README 2012-09-06 18:15:17 UTC (rev 3707)
+++ trunk/php/README 2012-09-06 18:22:53 UTC (rev 3708)
@@ -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: trunk/php/test/test.php
===================================================================
--- trunk/php/test/test.php 2012-09-06 18:15:17 UTC (rev 3707)
+++ trunk/php/test/test.php 2012-09-06 18:22:53 UTC (rev 3708)
@@ -5,11 +5,21 @@
dl("geos.so");
-require_once 'PHPUnit/Framework.php';
+if ( version_compare(PHPUnit_Runner_Version::id(), '3.6') < 0 )
+ 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 ( version_compare(PHPUnit_Runner_Version::id(), '3.5') < 0 )
+ 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