Skip to content

Instantly share code, notes, and snippets.

@jwhitcraft
Created May 3, 2011 17:43
Show Gist options
  • Save jwhitcraft/953806 to your computer and use it in GitHub Desktop.
Save jwhitcraft/953806 to your computer and use it in GitHub Desktop.
<?php
$subMock = $this->getMock("\\Sugar\\Data\\Subscription", array('isAddonValid'));
$subMock->expects($this->once())
->method('isAddonValid')
->with($this->equalTo('mobileservertest1'))
->will($this->returnValue(true));
$subMock->expects($this->once())
->method('isAddonValid')
->with($this->equalTo('mobileclienttest1'))
->will($this->returnValue(false));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment