This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  ec11d922efe1b1693951ad559ac53b8ae997d761 (commit)
      from  f2cb8c8e05f6d73512ee2459803031fe0742ea18 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=ec11d922efe1b1693951ad559ac53b8ae997d761

commit ec11d922efe1b1693951ad559ac53b8ae997d761
Author: Franck Villaume <[email protected]>
Date:   Sat Jun 12 20:12:33 2021 +0200

    try fixing SOAP testsuite for PHP <= 7.1.0

diff --git a/tests/func/70_SOAP/soapTest.php 
b/tests/func/70_SOAP/soapTest-php700.php
similarity index 99%
copy from tests/func/70_SOAP/soapTest.php
copy to tests/func/70_SOAP/soapTest-php700.php
index d08fddc..262d59f 100644
--- a/tests/func/70_SOAP/soapTest.php
+++ b/tests/func/70_SOAP/soapTest-php700.php
@@ -27,7 +27,7 @@ class SoapTest extends FForge_SeleniumTestCase
 {
        public $fixture = 'projecta';
 
-       protected function setUp():void {
+       protected function setUp() {
                parent::setUp();
 
                $this->session = NULL;
diff --git a/tests/func/70_SOAP/soapTest.php 
b/tests/func/70_SOAP/soapTest-php710.php
similarity index 100%
copy from tests/func/70_SOAP/soapTest.php
copy to tests/func/70_SOAP/soapTest-php710.php
diff --git a/tests/func/70_SOAP/soapTest.php b/tests/func/70_SOAP/soapTest.php
index d08fddc..296e7d7 100644
--- a/tests/func/70_SOAP/soapTest.php
+++ b/tests/func/70_SOAP/soapTest.php
@@ -1,8 +1,6 @@
 <?php
 /**
- * Copyright (C) 2014 Roland Mas
- * Copyright (C) 2015  Inria (Sylvain Beucler)
- * Copyright 2020, Franck Villaume - TrivialDev
+ * Copyright 2021, Franck Villaume - TrivialDev
  *
  * This file is part of FusionForge.
  *
@@ -21,109 +19,8 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-require_once dirname(dirname(__FILE__)).'/SeleniumForge.php';
-
-class SoapTest extends FForge_SeleniumTestCase
-{
-       public $fixture = 'projecta';
-
-       protected function setUp():void {
-               parent::setUp();
-
-               $this->session = NULL;
-               $this->soapclient = NULL;
-
-               $this->soapclient = new SoapClient(WSDL_URL,
-                                       array('cache_wsdl' => WSDL_CACHE_NONE,
-                                               'stream_context' => 
stream_context_create(array('ssl' => array('verify_peer' => false,
-                                                                               
                                'verify_peer_name' => false,
-                                                                               
                                'allow_self_signed' => true)))));
-
-               $this->assertNotNull($this->soapclient);
-       }
-
-       function testSoap()
-       {
-               $this->loadAndCacheFixture();
-
-               $userid = FORGE_ADMIN_USERNAME;
-               $passwd = FORGE_ADMIN_PASSWORD;
-
-               // Check version number
-               $version = $this->soapclient->version();
-               $this->assertMatchesRegularExpression('/^[-0-9.+a-z~]*$/', 
$version);
-
-               // Check login
-               $response = $this->soapclient->login($userid, $passwd);
-               $this->assertNotNull($response);
-               $this->session = $response;
-
-               // Check logging in with nonexisting user
-               try {
-                       $response = $this->soapclient->login('coin', 'pan');
-                       $this->fail('An expected exception has not been 
raised.');
-               }
-               catch (SoapFault $expected) {
-                       $this->assertEquals("Unable to log in with username of 
coin", $expected->faultstring);
-               }
-
-               // Check logging in with wrong password
-               try {
-                       $response = 
$this->soapclient->login(FORGE_ADMIN_USERNAME, 'pan');
-                       $this->fail('An expected exception has not been 
raised.');
-               }
-               catch (SoapFault $expected) {
-                       $this->assertEquals("Unable to log in with username of 
".FORGE_ADMIN_USERNAME, $expected->faultstring);
-               }
-
-               // Get list of groups with empty parameters
-               try {
-                       $response = 
$this->soapclient->getGroupsByName($this->session);
-                       $this->fail('An expected exception has not been raised. 
Got response :'.$response);
-               }
-               catch (SoapFault $expected) {
-                       $this->assertTrue( strpos($expected->faultstring, 
'Could Not Get Projects by Name') === 0);
-               }
-
-               // Get one group
-               $response = 
$this->soapclient->getGroupsByName($this->session,array('projecta'));
-               $group = $response[0];
-               $this->assertEquals('projecta', $group->unix_group_name);
-               $projecta = $group;
-
-               // Get several groups
-               $response = 
$this->soapclient->getGroupsByName($this->session,array('tmpl', 'projecta'));
-               foreach ($response as $group) {
-                       $response2 = 
$this->soapclient->getGroups($this->session, array($group->group_id));
-                       $group2 = $response2[0];
-                       $this->assertEquals($group->group_id, 
$group2->group_id);
-                       $this->assertEquals($group->unix_group_name, 
$group2->unix_group_name);
-               }
-
-               // Check trackers
-               $trackers = $this->soapclient->getArtifactTypes($this->session, 
$projecta->group_id);
-               $found = false;
-               foreach ($trackers as $t) {
-                       if ($t->name == 'Bugs') {
-                               $found = true;
-                               $tracker = $t;
-                       }
-               }
-               $this->assertTrue($found, "Trackers 'Bugs' not found");
-
-               $response = $this->soapclient->addArtifact($this->session, 
$projecta->group_id, $tracker->group_artifact_id, 1, 3, 100, "Bug submitted by 
SOAP", "Bug details are not really relevant here", array());
-
-               $this->switchUser(FORGE_ADMIN_USERNAME);
-               $this->gotoProject('ProjectA');
-               $this->clickAndWait("link=Tracker");
-               $this->clickAndWait("link=Bugs");
-               $this->assertTrue($this->isTextPresent("Bug submitted by 
SOAP"));
-               $this->clickAndWait("link=Bug submitted by SOAP");
-               $this->type("summary", 'Bug summary edited via web interface');
-               $this->clickAndWait("submit");
-
-               $bugs = $this->soapclient->getArtifacts($this->session, 
$projecta->group_id, $tracker->group_artifact_id, 0, 0);
-               $bug = $bugs[0];
-               $this->assertEquals('Bug summary edited via web interface', 
$bug->summary);
-       }
+if (PHP_VERSION_ID >= 70100) {
+       require_once dirname(__FILE__).'/soapTest-php710.php';
+} else {
+       require_once dirname(__FILE__).'/soapTest-php700.php';
 }

-----------------------------------------------------------------------

Summary of changes:
 .../70_SOAP/{soapTest.php => soapTest-php700.php}  |   2 +-
 .../70_SOAP/{soapTest.php => soapTest-php710.php}  |   0
 tests/func/70_SOAP/soapTest.php                    | 113 +--------------------
 3 files changed, 6 insertions(+), 109 deletions(-)
 copy tests/func/70_SOAP/{soapTest.php => soapTest-php700.php} (99%)
 copy tests/func/70_SOAP/{soapTest.php => soapTest-php710.php} (100%)


hooks/post-receive
-- 
FusionForge

_______________________________________________
Fusionforge-commits mailing list
[email protected]
http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits

Reply via email to