I have a method in a class that parses some xml.If it finds the tag < status >failure< /status >, it returns an exception.I want to build a unittest that checks this method does return an exception when the status=failure.For the moment, I fail to get it done using phpunit and MOCKING?Example:\[code\]<?php$mock = $this->getMock('Service_Order_Http', array('getResponse')); $mock->expects($this->any()) ->method('getResponse') ->will($this->throwException(new Exception())); $e = null; try { $mock->getResponse(); } catch (Exception $e) { } $this->assertTrue($e instanceof Exception, "Method getResponse should have thrown an exception");//phpunit sends back: PHPUnit_Framework_ExpectationFailedException : Failed asserting that exception of type "Exception" is thrown.?>\[/code\]Thanks for your help