You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "bruno rovagnati (JIRA)" <ji...@apache.org> on 2008/05/21 18:43:55 UTC

[jira] Created: (SHINDIG-295) PHPUnit

PHPUnit
-------

                 Key: SHINDIG-295
                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
             Project: Shindig
          Issue Type: New Feature
          Components: Common Components (PHP)
            Reporter: bruno rovagnati


PHPUnit Framework + first implementations of TestCases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Re: [jira] Commented: (SHINDIG-295) PHPUnit

Posted by Chris Chabot <ch...@xs4all.nl>.
On Jun 6, 2008, at 7:43 PM, Ropu wrote:

> The issues is that the script that runs the TC looks for those in  
> all the
> directories.
> <snip>
> ps: chris, dont get so stressed :D

Yea yea, just don't like broken stuff ok :)

Re: [jira] Commented: (SHINDIG-295) PHPUnit

Posted by Ropu <ro...@gmail.com>.
The issues is that the script that runs the TC looks for those in all the
directories.


when adding it to the SVN repo, the .svn/ is created and the script tries to
find some there...

will add a patch for this today. (ignore .* dirs.)

ropu

ps: chris, dont get so stressed :D

On Fri, Jun 6, 2008 at 8:07 AM, Chris Chabot (JIRA) <ji...@apache.org> wrote:

>
>    [
> https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603072#action_12603072]
>
> Chris Chabot commented on SHINDIG-295:
> --------------------------------------
>
> I've committed the patch but there are a few comments i have.
>
> First of all it didn't work since the require 'PHPUnit/*.php' are not on my
> local include path, so i did the same trick as we did with the zend
> framework and used some command line magic to mass rewrite all the
> statements using:
>
> Also when pulling in external libs it's important to mention where you got
> it from and what license it's published under, and preferable put this in a
> README file, so i went ahead and created a README file in the PHPUnit
> directory documenting the command line magic to mass rewrite the require
> statements, and list the license and project home page url's.
>
> Also the .htaccess file didn't work for me (broke everything) so i went
> back to the -d and -f rewrite rules, this allows tests to function, but i
> hope it doesn't break things for other people, mod_rewrite tends to be a bit
> temperamental at times :)
>
>
> So with that taken care of we get to the important point ... it doesn't
> work yet!
>
> /test/common/ and /test/socialdata/ give me the following output:
>
> Notice: Undefined variable: dir in
> /Users/chabotc/shindig/php/test/socialdata/index.php on line 8
> Test Cases
> PHPUnit 3.2.9 by Sebastian Bergmann.
> Time: 0 seconds
> OK (0 tests)
>
> /test/gadgets/ seems to give a svn properties dump of some kind (listed
> below)
>
> So please try to address these issues so we get a working test suite. I
> committed this since other people were waiting for PHPUnit to land so they
> could add their tests too, but this has been done under the assumption
> you'll follow up with a patch to actually make this work correctly :)
>
> Output i got with /test/gadgets/:
> K 25 svn:wc:ra_dav:version-url V 67
> /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets END
> GadgetContextTest.php K 25 svn:wc:ra_dav:version-url V 89
> /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/GadgetContextTest.php
> END index.php K 25 svn:wc:ra_dav:version-url V 77
> /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/index.php
> END GadgetIdTest.php K 25 svn:wc:ra_dav:version-url V 84
> /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/GadgetIdTest.php
> END 8 dir 663970
> https://svn.apache.org/repos/asf/incubator/shindig/trunk/php/test/gadgets
> https://svn.apache.org/repos/asf 2008-06-06T14:55:55.362859Z 663970
> chabotc svn:special svn:externals svn:needs-lock  GadgetContextTest.php file
> 2008-06-06T14:48:48.000000Z 8a98ddb9d9b2fdb49423617feef988e7
> 2008-06-06T14:55:55.362859Z 663970 chabotc  index.php file
> 2008-06-06T14:48:48.000000Z f70ca05cd76bc5d7dd4efb3c9fa60366
> 2008-06-06T14:55:55.362859Z 663970 chabotc  GadgetIdTest.php file
> 2008-06-06T14:48:48.000000Z 04bcdddf63bc220930c9c1f87f6e9f12
> 2008-06-06T14:55:55.362859Z 663970 chabotc  8
>
>
>
> > PHPUnit
> > -------
> >
> >                 Key: SHINDIG-295
> >                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
> >             Project: Shindig
> >          Issue Type: New Feature
> >          Components: Common Components (PHP)
> >            Reporter: bruno rovagnati
> >         Attachments: PHPUnit.patch
> >
> >
> > PHPUnit Framework + first implementations of TestCases
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
.-. --- .--. ..-
R o p u

Re: [jira] Commented: (SHINDIG-295) PHPUnit

Posted by Ropu <ro...@gmail.com>.
worked here

re creating the patch in 2 parts

Adding external/
updating test/

ropu

On Tue, Jun 10, 2008 at 2:17 PM, Chris Chabot (JIRA) <ji...@apache.org>
wrote:

>
>    [
> https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604046#action_12604046]
>
> Chris Chabot commented on SHINDIG-295:
> --------------------------------------
>
> Got a number of fails and a weird error on applying the patch:
>
> patching file test/common/index.php
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 23.
> Hunk #3 FAILED at 37.
> 3 out of 3 hunks FAILED -- saving rejects to file test/common/index.php.rej
>
> patching file test/gadgets/GadgetContextTest.php
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 18.
> Hunk #3 FAILED at 32.
> Hunk #4 FAILED at 37.
> Hunk #5 FAILED at 53.
> Hunk #6 FAILED at 75.
> Hunk #7 FAILED at 86.
> Hunk #8 FAILED at 92.
> Hunk #9 FAILED at 126.
> Hunk #10 FAILED at 137.
> Hunk #11 FAILED at 159.
> Hunk #12 FAILED at 178.
> Hunk #13 FAILED at 189.
> Hunk #14 FAILED at 198.
> Hunk #15 FAILED at 207.
> Hunk #16 FAILED at 218.
> Hunk #17 FAILED at 224.
> Hunk #18 FAILED at 365.
> 18 out of 18 hunks FAILED -- saving rejects to file
> test/gadgets/GadgetContextTest.php.rej
>
> patching file test/gadgets/GadgetIdTest.php
> Hunk #1 FAILED at 1.
> Hunk #2 FAILED at 12.
> Hunk #3 FAILED at 20.
> Hunk #4 FAILED at 32.
> Hunk #5 FAILED at 41.
> Hunk #6 FAILED at 61.
> Hunk #7 FAILED at 71.
> 7 out of 7 hunks FAILED -- saving rejects to file
> test/gadgets/GadgetIdTest.php.rej
>
> And the error:
> patch unexpectedly ends in middle of line
> patch: **** malformed patch at line 88646:
>
> Could you please re-diff against the lastest svn checkout, and make sure
> the 3mb patch file doesn't get damaged in transport?
>
> > PHPUnit
> > -------
> >
> >                 Key: SHINDIG-295
> >                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
> >             Project: Shindig
> >          Issue Type: New Feature
> >          Components: Common Components (PHP)
> >            Reporter: bruno rovagnati
> >         Attachments: PHPUnit.patch, shindig-php-testcases.patch
> >
> >
> > PHPUnit Framework + first implementations of TestCases
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
.-. --- .--. ..-
R o p u

[jira] Updated: (SHINDIG-295) PHPUnit

Posted by "bruno rovagnati (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bruno rovagnati updated SHINDIG-295:
------------------------------------

    Attachment: PHPUnit.patch

PHPUnit framework

Directory Structure 

First Test Cases

> PHPUnit
> -------
>
>                 Key: SHINDIG-295
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Common Components (PHP)
>            Reporter: bruno rovagnati
>         Attachments: PHPUnit.patch
>
>
> PHPUnit Framework + first implementations of TestCases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SHINDIG-295) PHPUnit

Posted by "bruno rovagnati (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

bruno rovagnati updated SHINDIG-295:
------------------------------------

    Attachment: shindig-php-testcases.patch

Big patch that:
Moves PHPUnit to /php/external
Reduce PHPUnit/* file from ~300 to ~180
Adds More TC


> PHPUnit
> -------
>
>                 Key: SHINDIG-295
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Common Components (PHP)
>            Reporter: bruno rovagnati
>         Attachments: PHPUnit.patch, shindig-php-testcases.patch
>
>
> PHPUnit Framework + first implementations of TestCases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-295) PHPUnit

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12604046#action_12604046 ] 

Chris Chabot commented on SHINDIG-295:
--------------------------------------

Got a number of fails and a weird error on applying the patch:

patching file test/common/index.php
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 23.
Hunk #3 FAILED at 37.
3 out of 3 hunks FAILED -- saving rejects to file test/common/index.php.rej

patching file test/gadgets/GadgetContextTest.php
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 18.
Hunk #3 FAILED at 32.
Hunk #4 FAILED at 37.
Hunk #5 FAILED at 53.
Hunk #6 FAILED at 75.
Hunk #7 FAILED at 86.
Hunk #8 FAILED at 92.
Hunk #9 FAILED at 126.
Hunk #10 FAILED at 137.
Hunk #11 FAILED at 159.
Hunk #12 FAILED at 178.
Hunk #13 FAILED at 189.
Hunk #14 FAILED at 198.
Hunk #15 FAILED at 207.
Hunk #16 FAILED at 218.
Hunk #17 FAILED at 224.
Hunk #18 FAILED at 365.
18 out of 18 hunks FAILED -- saving rejects to file test/gadgets/GadgetContextTest.php.rej

patching file test/gadgets/GadgetIdTest.php
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 12.
Hunk #3 FAILED at 20.
Hunk #4 FAILED at 32.
Hunk #5 FAILED at 41.
Hunk #6 FAILED at 61.
Hunk #7 FAILED at 71.
7 out of 7 hunks FAILED -- saving rejects to file test/gadgets/GadgetIdTest.php.rej

And the error:
patch unexpectedly ends in middle of line
patch: **** malformed patch at line 88646:  

Could you please re-diff against the lastest svn checkout, and make sure the 3mb patch file doesn't get damaged in transport? 

> PHPUnit
> -------
>
>                 Key: SHINDIG-295
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Common Components (PHP)
>            Reporter: bruno rovagnati
>         Attachments: PHPUnit.patch, shindig-php-testcases.patch
>
>
> PHPUnit Framework + first implementations of TestCases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SHINDIG-295) PHPUnit

Posted by "Chris Chabot (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SHINDIG-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603072#action_12603072 ] 

Chris Chabot commented on SHINDIG-295:
--------------------------------------

I've committed the patch but there are a few comments i have. 

First of all it didn't work since the require 'PHPUnit/*.php' are not on my local include path, so i did the same trick as we did with the zend framework and used some command line magic to mass rewrite all the statements using:

Also when pulling in external libs it's important to mention where you got it from and what license it's published under, and preferable put this in a README file, so i went ahead and created a README file in the PHPUnit directory documenting the command line magic to mass rewrite the require statements, and list the license and project home page url's.

Also the .htaccess file didn't work for me (broke everything) so i went back to the -d and -f rewrite rules, this allows tests to function, but i hope it doesn't break things for other people, mod_rewrite tends to be a bit temperamental at times :)


So with that taken care of we get to the important point ... it doesn't work yet!

/test/common/ and /test/socialdata/ give me the following output:

Notice: Undefined variable: dir in /Users/chabotc/shindig/php/test/socialdata/index.php on line 8
Test Cases
PHPUnit 3.2.9 by Sebastian Bergmann.
Time: 0 seconds
OK (0 tests)

/test/gadgets/ seems to give a svn properties dump of some kind (listed below)

So please try to address these issues so we get a working test suite. I committed this since other people were waiting for PHPUnit to land so they could add their tests too, but this has been done under the assumption you'll follow up with a patch to actually make this work correctly :)

Output i got with /test/gadgets/:
K 25 svn:wc:ra_dav:version-url V 67 /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets END GadgetContextTest.php K 25 svn:wc:ra_dav:version-url V 89 /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/GadgetContextTest.php END index.php K 25 svn:wc:ra_dav:version-url V 77 /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/index.php END GadgetIdTest.php K 25 svn:wc:ra_dav:version-url V 84 /repos/asf/!svn/ver/663970/incubator/shindig/trunk/php/test/gadgets/GadgetIdTest.php END 8 dir 663970 https://svn.apache.org/repos/asf/incubator/shindig/trunk/php/test/gadgets https://svn.apache.org/repos/asf 2008-06-06T14:55:55.362859Z 663970 chabotc svn:special svn:externals svn:needs-lock  GadgetContextTest.php file 2008-06-06T14:48:48.000000Z 8a98ddb9d9b2fdb49423617feef988e7 2008-06-06T14:55:55.362859Z 663970 chabotc  index.php file 2008-06-06T14:48:48.000000Z f70ca05cd76bc5d7dd4efb3c9fa60366 2008-06-06T14:55:55.362859Z 663970 chabotc  GadgetIdTest.php file 2008-06-06T14:48:48.000000Z 04bcdddf63bc220930c9c1f87f6e9f12 2008-06-06T14:55:55.362859Z 663970 chabotc  8 



> PHPUnit
> -------
>
>                 Key: SHINDIG-295
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-295
>             Project: Shindig
>          Issue Type: New Feature
>          Components: Common Components (PHP)
>            Reporter: bruno rovagnati
>         Attachments: PHPUnit.patch
>
>
> PHPUnit Framework + first implementations of TestCases

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.