ok, i managed to get the unit tests to atleast show an output,
however, it shows this error

# Multiply(...)
ok 1 - response object . is a double
not ok 2 - response object . is 10
#     Failed test (./plugins/ckWebServicePlugin/lib/test/
ckTestSoapClient.class.php at line 368)
#            got: 1
#       expected: 10
1..2
# Looks like you failed 1 tests of
2.


i don't get why the output would be one unless the request object is
outputting arrays. The methods and tests are
exactly like in  the documentation.

please help

On Apr 4, 10:19 am, el-sid <sydneyari...@gmail.com> wrote:
> hi all,
>
> been trying out the ckWebServicePlugin but i am unable to get the unit
> tests to show any result
>  my app.yml is
>
> all:
>   enable_soap_parameter: off
>   #your environment for webservice mode
>   soap:
>     #enable the `ckSoapParameterFilter`
>     enable_soap_parameter: on
>     ck_web_service_plugin:
>       #the location of your wsdl file
>       wsdl: %SF_WEB_DIR%/TestApi.wsdl
>       #the class that will be registered as handler for webservice
> requests
>       handler: TestApiHandler
>
>   soaptest:
>     enable_soap_parameter: on
>     ck_web_service_plugin:
>       wsdl: %SF_WEB_DIR%/TestApi.wsdl
>       handler: TestApiHandler
>
> the module is
>
> public function executeMultiply($request)
>         {
>                 $factorA = $request->getParameter('a');
>                 $factorB = $request->getParameter('b');
>
>                 if(is_numeric($factorA) && is_numeric($factorB))
>                 {
>                         $this->result = $factorA * $factorB;
>
>                         //$result = $this->result;
>
>                         //return $request;
>
>                         return sfView::SUCCESS;
>                 }
>                 else
>                 {
>                         return sfView::ERROR;
>                 }
>         }
>
> and the test script is
>
> <?php
>
> $app   = 'frontend';
> $debug = true;
>
> include_once(dirname(__FILE__).'/../bootstrap/soaptest.php');
>
> $c = new ckTestSoapClient();
>
> // test executeMultiply
> $c->test_multiply(5, 2)    // call the action
>   //->isFaultEmpty()         // check there are no errors
>   //->isType('', 'double')   // check the result type is double
>     ->is('', 10);            // check the result value is 10
>
> $result = $c->getResult();
>
> echo $result;
>
> i have been following the documentation but i just can't seem to get
> the tests to work.
> when i type this command
>
> php test/functional/testApiTest.php
>
> nothing happens, no error message, nothing.
>
> anyone knows how to fix this?
>
> thanks

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to