Created
June 11, 2012 19:15
-
-
Save tareko/2912083 to your computer and use it in GitHub Desktop.
Trying to test a 'false' return
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Here is the function in the test file: | |
public function testStartUnprocessedWithFailedTradeRequest() { | |
//TODO: Fix Broken test | |
$Trades = $this->getMockBuilder('_TradeRequest') | |
->setMethods(array('send')) | |
->disableOriginalConstructor() | |
->getMock(); | |
$this->_TradeRequest->expects($this->any()) | |
->method('send') | |
->will($this->returnValue(true)); | |
$result = $this->testAction('/trades/startUnprocessed'); | |
debug($result); | |
} | |
// Here is the code being tested: | |
$sendDetails = $this->_TradeRequest->send($tradesDetail['id'], $trade['User'], $tradesDetail['User'], $trade['Shift'], $method); | |
if ($sendDetails['return'] == true) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment