* @expectedException CRM_Extension_Exception
*/
public function testInstallInvalidType() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$testingTypeManager->expects($this->never())
->method('onPreInstall');
$manager = $this->_createManager(array(
* "the first row" or "all rows".
*/
public function testInstall_Disable_Uninstall() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* @throws \CRM_Extension_Exception
*/
public function test_InstallAuto_DisableDownstream_UninstallDownstream() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* @throws \CRM_Extension_Exception
*/
public function testInstallAuto_Twice() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
}
public function test_InstallAuto_DisableUpstream() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Subseuently disable and uninstall.
*/
public function testInstall_DirtyRemove_Disable_Uninstall() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Install an extension with a valid type name.
*/
public function testInstall_Disable_Enable() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Performing 'install' on a 'disabled' extension performs an 'enable'
*/
public function testInstall_Disable_Install() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Install an extension with a valid type name.
*/
public function testEnableBare() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Get the status of an unknown extension.
*/
public function testStatusUnknownKey() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$testingTypeManager->expects($this->never())
->method('onPreInstall');
$manager = $this->_createManager(array(
* Replace code for an extension that doesn't exist in the container
*/
public function testReplace_Unknown() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* Replace code for an extension that doesn't exist in the container
*/
public function testReplace_Uninstalled() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* file="oddball", and the upgrade has file="newextension".
*/
public function testReplace_Installed() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));
* file="oddball", and the upgrade has file="newextension".
*/
public function testReplace_InstalledMissing() {
- $testingTypeManager = $this->getMock('CRM_Extension_Manager_Interface');
+ $testingTypeManager = $this->createMock('CRM_Extension_Manager_Interface');
$manager = $this->_createManager(array(
self::TESTING_TYPE => $testingTypeManager,
));