Skip to content

Commit

Permalink
Add a setAppNamespace() convenience function to replace literal calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ravage84 committed Jun 15, 2017
1 parent 48e0393 commit cd02266
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/TestSuite/TestCase.php
Expand Up @@ -676,4 +676,15 @@ public function getMockForModel($alias, array $methods = [], array $options = []

return $mock;
}

/**
* Set the app namespace
*
* @param string $appNamespace The app namespace, defaults to "TestApp".
* @return void
*/
public static function setAppNamespace($appNamespace = 'TestApp')
{
Configure::write('App.namespace', $appNamespace);
}
}

0 comments on commit cd02266

Please sign in to comment.