List Info

Thread: Re: SimpleTest and PHP5 exceptions




Re: SimpleTest and PHP5 exceptions
country flaguser name
Germany
2007-09-28 06:28:10
Hia

After asking the same question I was told to use the
following code which
works pretty good. 
Anyway, a error case is not a easy ne liner test: 

* Type of exeption 
* error code
* message 
* stack 

Etc. So I suspect the future tests will remain the same for
us. 

S. 


try {
	$lo = new Me_Product_List();
	$prod = $lo->fetchOne('foo');
	$this->fail('Sollte hier nicht ankommen');
} catch( Exception $e) {
	 $this->assertIsA($e,
'Exceptions_InvalidArgumentException');
}





-----Ursprüngliche Nachricht-----
Von: simpletest-support-bounceslists.sourceforge.net
[mailto:simpletest-support-bounceslists.sourceforge.net] Im
Auftrag von
Perrick Penet
Gesendet: Freitag, 28. September 2007 12:11
An: Help, advice, bugs and workarounds
Betreff: Re: [Simpletest-support] SimpleTest and PHP5
exceptions

Go for the CVS version : it's pretty stable right now.
There're quite a 
few of us using it already.

Yours,
	Perrick



Victor Stinner wrote:
> Hi,
> 
> I started to write unit tests for my application with
SimpleTest. But
since my 
> application uses exceptions, I'm unable to use
SimpleTest 1.0. I see that 
> last version (CVS) supports them, great. So should I
always use CVS or do
you 
> plan to release a version (alpha, beta or stable)
quickly?
> 
> Victor Stinner
> http://www.inl.fr/
> 
>
------------------------------------------------------------
-------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Simpletest-support mailing list
> Simpletest-supportlists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/simp
letest-support
> 
> 

------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Simpletest-support mailing list
Simpletest-supportlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simp
letest-support


------------------------------------------------------------
-------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Simpletest-support mailing list
Simpletest-supportlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/simp
letest-support

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )