Esempio n. 1
0
 /**
  * @group filters
  * @group upload
  */
 public function test_buddydrive_get_upload_error_strings()
 {
     $expected = buddydrive_get_upload_error_strings();
     add_filter('buddydrive_get_upload_error_strings', array($this, 'filter_error_strings_ko'), 10, 1);
     $tested = buddydrive_get_upload_error_strings();
     remove_filter('buddydrive_get_upload_error_strings', array($this, 'filter_error_strings_ko'), 10, 1);
     $this->assertSame($expected, $tested);
     $expected[12] = 'taz';
     add_filter('buddydrive_get_upload_error_strings', array($this, 'filter_error_strings_ok'), 10, 1);
     $tested = buddydrive_get_upload_error_strings();
     remove_filter('buddydrive_get_upload_error_strings', array($this, 'filter_error_strings_ok'), 10, 1);
     $this->assertSame($expected, $tested);
 }
 /**
  * The constuctor
  *
  * @since 1.3.0
  */
 public function __construct()
 {
     parent::__construct(array('action' => 'buddydrive_upload', 'file_input' => 'buddyfile-upload', 'base_dir' => 'buddydrive', 'upload_error_strings' => buddydrive_get_upload_error_strings(), 'allowed_mime_types' => buddydrive_get_allowed_upload_exts()));
 }