Inheritance: extends PHPUnit_Framework_TestCase
Ejemplo n.º 1
0
 public function setUp()
 {
     parent::setUp();
     // do this so if there was an error that prevented clean up in the last test run we can still test again.
     $this->cleanUpTestUser();
     $this->createTestUser();
     $this->client = new Client(Yii::app()->params['pas_api_test_base_url'] . $this->base_url_stub, array(Client::REQUEST_OPTIONS => array('auth' => array($this->user->username, $this->user_password), 'headers' => array('Accept' => 'application/xml'))));
 }
Ejemplo n.º 2
0
 public function tearDown()
 {
     parent::tearDown();
     if ($this->packageExists) {
         //Copy original contents back in
         copy_recursive('custom/modules/' . $this->package . '_bak', 'custom/modules/' . $this->package);
         rmdir_recursive('custom/modules/' . $this->package . '_bak');
     } else {
         rmdir_recursive('custom/modules/' . $this->package);
     }
     unset($_SESSION['avail_modules'][$this->package]);
 }
Ejemplo n.º 3
0
 public function tearDown()
 {
     parent::tearDown();
     SugarTestUserUtilities::removeAllCreatedAnonymousUsers();
     unset($GLOBALS['current_user']);
 }