Žilvinas Šaltys | 19 Aug 2009 10:58
Picon
Gravatar

Contributing to the manual

Hello,


First of all I want to say that PHPUnit is an amazingly great opensource project. My company is quite new to PHPUnit so eventually we ended spending a lot of time reading the manual. You would probably agree that Mocks are a very important part of writing real world test cases.
From my own experience I know that Mocks are not the easiest part to understand at first. That's why I believe it's documentation should be really good.

Current Mocks documentation http://www.phpunit.de/manual/current/en/test-doubles.html and possible issues with it:

1. $this->getMock() parameters not explained.
2. with() is not in the 11.1 table and has no explanation.
3. There's no example with $this->expects($this->at(1))->method('foo')->with($mixed)->will($this->returnValue($mixed)); I believe it's a very important example that is somehow not easy to figure out for new people who have only the documentation to read. For example I remember how long it took me to grasp that at($key) is based per Mock invocation and not Method invocation and what strange error message get when you don't understand that :] Not to mention figuring out if it starts from 0 or 1.
4. Mocks extend the Mocked class. That is a very nice thing to know. This allows to mock protected methods? Which is also very nice to know.
5. You cannot mock private methods and maybe you shouldn't ?

I don't know if the PHPUnit documentation has any goals to explain not only how PHPunit works but also give an idea of how to test write tests. How to handle certain challenges.

I would be interested in helping to contribute to the manual, but couldn't find any guide how to contribute to it.

Thank you,
Sebastian Bergmann | 19 Aug 2009 11:01
Picon
Gravatar

Re: Contributing to the manual

Žilvinas Šaltys schrieb:
> I would be interested in helping to contribute to the manual, but
> couldn't find any guide how to contribute to it.

 The manual uses DocBook/XML, check out

   svn://svn.phpunit.de/phpunit/manual/branches/3.4/en

 to get the source files for the English edition of the manual for
 PHPUnit 3.4. The test-doubles.xml file contains the source for the
 Test Doubles chapter.

--

-- 
Sebastian Bergmann                    Co-Founder and Principal Consultant
http://sebastian-bergmann.de/                           http://thePHP.cc/

Davide Mendolia | 21 Aug 2009 15:29
Picon

PHP and continuous integration

Hello,

I decided to started a project of hosting of continous integration process
for PHP applications.
A the website : http://www.php-ci.net

   - You will find on it information about continuous integration in PHP.
   - You will be able to ask an hosting of your project :
   http://www.php-ci.net/hosting/create-project
   - And consult the result of the execution of builds of project hosted :
   http://php-ci.net:8080/

If you have any suggestions, questions or remarks, please don't hesitate

Thank you
--

-- 
Davide Mendolia
Johannes Trink | 25 Aug 2009 12:44

Maybe bug in table definition for test database

There seems to be a bug in definition of table "metrics_function" in /PHPUnit/Util/Log/Database/MySQL.sql and /PHPUnit/Util/Log/Database/SQLite3.sql (i checked branches 3.2, 3.3, 3.4)

code_function_id references to  code_method.code_function_id, which doesnt exist.

Hannes.

Sebastian Bergmann | 25 Aug 2009 13:00
Picon
Gravatar

Re: Maybe bug in table definition for test database

Johannes Trink schrieb:
> code_function_id references to  code_method.code_function_id, which
> doesnt exist.

 Thank you for reporting this, but I don't fix bugs in deprecated
 features.

--

-- 
Sebastian Bergmann                    Co-Founder and Principal Consultant
http://sebastian-bergmann.de/                           http://thePHP.cc/

Johannes Trink | 25 Aug 2009 13:07

Re: Maybe bug in table definition for test database

Sorry,

didnt see, its deprecated. http://www.phpunit.de/wiki/Ideas made me believe that Test Result Database is a ongonig feature.

On Tue, Aug 25, 2009 at 1:00 PM, Sebastian Bergmann <sb <at> sebastian-bergmann.de> wrote:
Johannes Trink schrieb:
> code_function_id references to  code_method.code_function_id, which
> doesnt exist.

 Thank you for reporting this, but I don't fix bugs in deprecated
 features.

--
Sebastian Bergmann                    Co-Founder and Principal Consultant
http://sebastian-bergmann.de/                           http://thePHP.cc/




--
Mit freundlichen Grüßen,
Johannes Trink

Hauptstraße 44
3811 Kirchberg an der Wild
Tel.: 0664 737 53 654
Bruno Reis | 25 Aug 2009 16:15
Picon

Erro grave.

Caros,

Estou concentrado aqui no meu trabalho em uma tarefa e por conta disso mandei uma mensagem relativa a uma candidatura a presidência para um monte de lista e pessoas sem pensar no que estava fazendo.

Sei que a mensagem deve ter ido para muitas listas que não tem escopo político, por isso reconheço já de antemão o meu deslize. Por favor, apenas ignorem.


Gmane