Exemplo n.º 1
0
 protected function cleanup()
 {
     parent::cleanup();
     if (file_exists(dirname(__FILE__) . '/test.txt')) {
         unlink(dirname(__FILE__) . '/test.txt');
     }
     if (file_exists(dirname(__FILE__) . '/test.invalid')) {
         unlink(dirname(__FILE__) . '/test.invalid');
     }
 }
 protected function setUp()
 {
     $this->tables = array_merge($this->tables, array('Files', 'FileVersions', 'Users', 'PermissionAccessEntityTypes', 'FileAttributeValues', 'FileImageThumbnailTypes', 'FilePermissionAssignments', 'AttributeKeyCategories', 'AttributeTypes', 'ConfigStore', 'AttributeKeys', 'SystemContentEditorSnippets', 'AttributeValues', 'atNumber', 'FileVersionLog'));
     parent::setUp();
     define('UPLOAD_FILE_EXTENSIONS_ALLOWED', '*.txt;*.jpg;*.jpeg;*.png');
     Category::add('file');
     $number = AttributeType::add('number', 'Number');
     FileKey::add($number, array('akHandle' => 'width', 'akName' => 'Width'));
     FileKey::add($number, array('akHandle' => 'height', 'akName' => 'Height'));
     CacheLocal::flush();
 }
 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Listener, $this->Model);
     ClassRegistry::flush();
 }
 /**
  * tearDown
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Image);
     ClassRegistry::flush();
 }
 /**
  * End Test
  *
  * @return void
  */
 public function tearDown()
 {
     parent::tearDown();
     unset($this->Image);
 }
 protected function setUp()
 {
     $this->tables = array_merge($this->tables, array('Files', 'FileVersions', 'Users', 'PermissionAccessEntityTypes'));
     parent::setUp();
 }