Commit Graph

1144 Commits

Author SHA1 Message Date
Thomas Müller 73ac3d0fcd Merge pull request #7643 from owncloud/chainable_response
Chainable Response in AppFramework
2014-04-08 22:42:43 +02:00
Vincent Petry bfb1e0867f Enable autowatch for karma
This way unit tests can be run in multiple browsers with the command
line and tests will re-run automatically when files are changed.
2014-04-08 17:21:11 +02:00
Thomas Müller a4fc92b05b class Test_Config is already declared 2014-04-08 14:15:33 +02:00
Arthur Schiwon 9597f41904 add group tests 2014-04-08 12:32:30 +02:00
Thomas Müller 240d1ae6b9 unit test testSetAppValueIfSetToNull() added 2014-04-07 20:56:43 +02:00
Fabian Henze 1245ff8f31 Add unit tests for OC_Helper::phpFileSize function 2014-04-07 15:31:34 +02:00
Thomas Müller ccf1287fbf adding unit test for cache mechanism 2014-04-04 16:21:50 +02:00
Thomas Müller f029312e5b fixing typos/spellings 2014-04-04 11:37:47 +02:00
Thomas Müller 20f26068e7 Merge pull request #7476 from owncloud/type-hinting
Type hinting
2014-04-03 20:02:27 +02:00
tomneedham b00592ade5 Fix test case for api response code 2014-04-03 14:47:55 +00:00
Thomas Müller a2efdb8722 Merge pull request #7970 from owncloud/webdav-upload-hash
Fix uploading files containing a # in the path for webdav
2014-04-03 16:09:44 +02:00
Vincent Petry 4cc70ec39d Merge pull request #7979 from owncloud/core-fixfilegetcontentsloop
Correctly read the full stream in file_get_contents
2014-04-02 10:55:50 +02:00
Thomas Müller 82d1ea240e Merge pull request #7884 from owncloud/use-idn_to_ascii-if-available
idn_to_ascii is only used if available
2014-04-01 22:51:23 +02:00
Vincent Petry d6ce45fe61 Correctly read the full stream in file_get_contents
When using user-defined stream wrappers, PHP will
return a maximum of 8192 bytes even if more was
requested.

This fix uses stream_get_contents to make sure the full stream is read
and not only the first 8 KB.

Added unit test with a bigger test file to cover this case.
2014-04-01 10:07:16 +02:00
Bart Visscher 6b061c236d Merge branch 'master' into type-hinting
Conflicts:
	lib/private/image.php
	lib/private/l10n.php
	lib/private/request.php
	lib/private/share/mailnotifications.php
	lib/private/template/base.php
2014-03-31 21:38:54 +02:00
Robin Appelman 76c63a5760 Fix uploading files containing a # in the path for webdav 2014-03-31 17:00:32 +02:00
Thomas Müller 70db348475 Merge pull request #7824 from owncloud/hash-parameter-order
Fix parameter order for Storage\Local::hash
2014-03-28 13:06:07 +01:00
Vincent Petry d0012e729a Merge pull request #7879 from owncloud/sharing_cleanup_public_api
sharing api cleanup, first step
2014-03-28 12:23:11 +01:00
Vincent Petry 5068c57845 Merge pull request #7613 from owncloud/fix_urlGenerator2
Add \OC::$WEBROOT to URLGenerator::getAbsoluteURL()
2014-03-28 12:12:49 +01:00
Vincent Petry 040f430f0c Merge pull request #7829 from owncloud/cachefolderlocation
Cache folder is now configurable
2014-03-28 12:08:38 +01:00
Vincent Petry ef2c176eef Merge pull request #7678 from owncloud/test-bootstrap-fileproxy-cleanup
Cleanup the fileproxy proxies on test bootstrap
2014-03-28 11:33:57 +01:00
Robin Appelman 371a924c92 merge master into webdav-injection 2014-03-26 14:26:07 +01:00
Thomas Müller 83b4bcfdbf idn_to_ascii is only used if available 2014-03-26 11:17:23 +01:00
Thomas Müller 1ae10b9da3 Merge pull request #7420 from owncloud/cachehooks-first
Manually triger the filecache update hooks before any other hook
2014-03-25 22:41:09 +01:00
Thomas Müller bbc2e37259 Merge pull request #7477 from owncloud/foldersize-reuse
Allow re-using already known fileinfo when calculating folder sizes
2014-03-25 22:33:24 +01:00
Bjoern Schiessle bc0292c16d always return an array 2014-03-25 17:47:24 +01:00
Thomas Müller 531c9564b3 Merge pull request #7861 from owncloud/idn-domains-support-on-emails-master
idn have to be converted before being used
2014-03-25 12:38:32 +01:00
Vincent Petry 1e39719926 Added unit tests for external cache folder 2014-03-24 14:32:04 +01:00
Thomas Müller fb7f3008d3 idn have to be converted before being used 2014-03-24 13:46:31 +01:00
icewind1991 4c8a83e82f Merge pull request #7714 from owncloud/phpunit-config
Allow setting the config dir to use as enviroment variable for phpunit
2014-03-24 13:01:37 +01:00
Robin Appelman fffe330bbc Fix parameter order for Storage\Local::hash 2014-03-20 15:32:12 +01:00
Vincent Petry 316a22b463 Merge pull request #7808 from owncloud/quota-usequotaevenwhenfreespaceunknown
Still return quota value when free space is unknown
2014-03-20 15:29:14 +01:00
Vincent Petry 36c0f08ec0 Merge pull request #7732 from owncloud/datafolderexistence
Added .ocdata file to check for data folder validity
2014-03-20 11:31:28 +01:00
Vincent Petry 66bc0f0848 Still return quota value when free space is unknown
Fixed the quota storage wrapper to correctly return the quota value when
the free space is not known (which usually happens when the disk_free_space
function is disabled)
2014-03-19 19:07:11 +01:00
Thomas Müller 153eadd753 Merge branch 'master' into close-session-faster-master 2014-03-17 21:57:48 +01:00
Thomas Müller 6bbbf8536f introduce reopen() method to be used for unit test execution only - right after a unit test has been executed the session will be reopened 2014-03-17 21:57:10 +01:00
Thomas Müller 756bbe8786 Merge pull request #7649 from owncloud/routing-public
Move routing classes to an interface and expose it in the public api
2014-03-17 21:07:05 +01:00
icewind1991 5c72b526a3 Merge pull request #7760 from owncloud/core-roundbytes
Correctly round bytes when converted from human readable format
2014-03-17 15:21:57 +01:00
Vincent Petry 145db370d1 Correctly round bytes when converted from human readable format
Instead of leave two decimal places which is confusing, round the byte
values correctly to the closest byte.
2014-03-17 12:15:12 +01:00
Thomas Müller cd038604d3 unit tests for specific image type output added 2014-03-17 08:40:59 +01:00
Thomas Müller fe05c0c81b move session reset to endTest() - necessary because we need a valid session in the next unit tests setUp() call 2014-03-14 18:16:20 +01:00
Vincent Petry 3c46dcd7dd Added .ocdata file to check for data folder validity
In environments where the data folder is mount from another partition,
it is important to check that the data folder we see is actually the
real one. If the mount failed for some reasons, this fix will make
ownCloud temporarily unavailable instead of causing unpredictable
behavior.
2014-03-14 15:36:35 +01:00
Thomas Müller fc697c7298 adding StartSessionListener which initializes the session before each test case execution 2014-03-13 16:19:17 +01:00
Robin Appelman eabeedb306 Merge branch 'master' into cachehooks-first 2014-03-13 15:22:00 +01:00
Robin Appelman a8eb7a5092 Allow setting the config dir to use as enviroment variable for phpunit 2014-03-13 13:33:09 +01:00
Bart Visscher d798169037 Cleanup the fileproxy proxies on test bootstrap 2014-03-11 21:03:29 +01:00
Robin Appelman d55c7223a9 Merge branch 'master' into foldersize-reuse
Conflicts:
lib/private/files/cache/homecache.php
2014-03-11 13:04:20 +01:00
Vincent Petry c1cb9ee9b0 Merge pull request #7650 from owncloud/quota-totalspace
Fixed total space display when data size exceeds quota
2014-03-11 12:40:59 +01:00
Vincent Petry 010eef95c0 Fixed total space display when data size exceeds quota
The total space display in the personal page now shows the quota value
instead of used space when used space exceeds the quota (soft quota).
2014-03-10 17:59:14 +01:00
Robin Appelman 8ab7d18a6a Move the router classes to a namespace and expose it with a public interface 2014-03-10 14:04:58 +01:00
Vincent Petry 26513bc17b Merge pull request #7624 from owncloud/enc-encryptedusedspacefix
[master] Fixed used space to be based on unencrypted size
2014-03-10 09:38:24 +01:00
Thomas Tanghus 8f6ea900f2 Chainable Response in AppFramework 2014-03-09 23:01:16 +01:00
Vincent Petry 48d63a6278 Return unencrypted_size of folder when queried
This fixes the "used space" to be based on the unencrypted size, not
encrypted size, to be consistent with how quota/space is handled when
encryption is enabled
2014-03-07 14:59:09 +01:00
Thomas Tanghus ada8d4e0c9 Fix unit tests 2014-03-07 02:44:34 +01:00
Robin Appelman 84cf40ed82 merge master into webdav-injection 2014-03-06 13:35:06 +01:00
Vincent Petry c7e204bd36 Added unit tests for serverHost and other related functions 2014-03-06 11:51:17 +01:00
Thomas Tanghus b54b0b2153 Yet another cleanup 2014-03-05 00:26:06 +01:00
Robin Appelman 5211566205 update test case 2014-03-04 16:36:03 +01:00
Robin Appelman bb8a7a2230 Remove assert since the root size of the home storage is no longer calculated 2014-03-03 16:48:06 +01:00
Robin Appelman 331fc55e2d Update unit tests to use the new injection 2014-03-03 14:27:24 +01:00
Bart Visscher 35a8dfb2fa More PHPDoc fixes, using scrutinizer patches as hints 2014-02-28 13:53:41 +01:00
Thomas Müller 93b8aba3a1 Merge pull request #7439 from owncloud/unit-test-for-7430
adding test for migrations on columns using keywords
2014-02-27 21:52:46 +01:00
Bart Visscher 3116bede68 Add unit tests for getUserGroups with addUser and removeUser 2014-02-27 21:04:44 +01:00
Jörn Friedrich Dreyer 2ba6cd4e2b initialize etags of temporary storage 2014-02-27 12:44:07 +01:00
Jörn Friedrich Dreyer 131c12ad8d use assertInternalType for typechecking 2014-02-27 09:51:26 +01:00
Jörn Friedrich Dreyer 39f2f564a9 use assertSame and assertNotSame for etag checks 2014-02-27 09:39:34 +01:00
Thomas Müller 230e5e3788 let's name the column 'select' because this is a keyword on all platforms 2014-02-26 20:47:07 +01:00
Thomas Müller 459b5086d5 adding test for migrations on columns using keywords 2014-02-26 20:42:45 +01:00
Robin Appelman bc49c6be04 Manually triger the filecache update hooks before any other hook 2014-02-26 14:29:13 +01:00
Björn Schießle 6bde602c09 Merge pull request #7292 from owncloud/sharing_tests
fix sharing unit tests
2014-02-21 14:24:51 +01:00
Björn Schießle 9f0fc30251 Merge pull request #7337 from owncloud/test_for_6935
add unit test for \OC\URLGenerator::getAbsoluteURL
2014-02-21 13:45:49 +01:00
Bjoern Schiessle cf7ef0d356 fix sharing unit tests 2014-02-21 13:36:00 +01:00
Robin Appelman 2293563488 Remove unit tests which causes the filesystem tests to fail 2014-02-21 10:02:03 +01:00
Bjoern Schiessle 1ae6e9ec21 add unit test for \OC\URLGenerator::getAbsoluteURL to verify #6935 2014-02-20 19:06:42 +01:00
Thomas Müller ec45a3c0e2 Merge pull request #6962 from owncloud/quota-space-root
Allow passing a root folder to get the used space from in the quota wrapper
2014-02-20 16:47:59 +01:00
Lukas Reschke 719f1111b6 Merge pull request #6714 from owncloud/files-newfileinvalidcharsfix
Added extra checks for invalid file chars in newfile.php and newfolder.php
2014-02-20 11:53:58 +01:00
Vincent Petry b2b35cd335 Fixed ext storage webdav path encoding
- Some WebDAV servers like lighttpd need paths in URLs to be properly
encoded
- Added error log output when curl connection failed
- Added check for 'resourcetype' in case the WebDAV server doesn't
  support/return it
- Fixed touch() to return false if the server doesn't implement
  PROPPATCH
- Added optional delay in WebDAV unit tests to use when testing against
  lighttpd's WebDAV
2014-02-19 18:34:08 +01:00
Morris Jobke bcad6e641a Merge pull request #7274 from owncloud/scrutinizer-patch-1
Scrutinizer Auto-Fixes
2014-02-19 11:51:04 +01:00
icewind1991 2d5ab1a5c4 Merge pull request #7260 from owncloud/watcher-policy
Allow setting the frequency of which the file watcher checks for updates
2014-02-19 11:17:27 +01:00
Robin Appelman eea1abae20 add unit tests for watcher policies 2014-02-19 09:52:51 +01:00
Scrutinizer Auto-Fixer adaee6a5a1 Scrutinizer Auto-Fixes
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720

Enabled analysis tools:
 - PHP Analyzer
 - JSHint
 - PHP Copy/Paste Detector
 - PHP PDepend
2014-02-19 09:31:54 +01:00
icewind1991 3cc7228c7c Merge pull request #7253 from owncloud/preferences-caching
Add caching to OC\Preferences
2014-02-18 18:17:58 +01:00
Vincent Petry bd71a1b7b6 Added file name check in webdav connector
- added file name check for the put, rename and setNames() methods which
  throw a "Bad Request" whenever invalid characters are used
- replaced \OC\Filesystem usage with $this->getFS() to be able to write
  unit tests
2014-02-18 17:54:32 +01:00
Vincent Petry 797e0a614c Added extra checks for invalid file chars in newfile.php and newfolder.php
- added PHP utility function to check for file name validity
- fixes issue where a user can create a file called ".." from the files UI
- added extra checks to make sure newfile.php and newfolder.php also
  check for invalid characters
2014-02-18 17:54:32 +01:00
Tom Needham a573fe7d76 Merge pull request #6650 from owncloud/migration_unit_tests
User migration fix, and basic unit test
2014-02-18 17:35:49 +01:00
Lukas Reschke 3b1083f46e Merge pull request #7176 from owncloud/style
Some style fixes
2014-02-18 17:30:26 +01:00
tomneedham 589a7b220b Fix poor spelling 2014-02-18 16:23:16 +00:00
Robin Appelman 2166683e3b Allow setting the frequency of which the file watcher checks for updates 2014-02-18 16:34:25 +01:00
Robin Appelman b6f44e9a1d Add caching to OC\Preferences 2014-02-18 11:21:39 +01:00
tomneedham a4b6d66703 Merge branch 'master' into migration_unit_tests 2014-02-17 11:03:57 +00:00
tomneedham 049e03c2b9 Finish basic testing of user export 2014-02-17 10:58:27 +00:00
Thomas Müller 750ffa8231 Merge pull request #7156 from owncloud/backgroundjob-public
Add the background job list to the public server container
2014-02-14 23:11:10 +01:00
Robin Appelman b35f679483 Fix test cases for group manager 2014-02-14 15:07:08 +01:00
Robin Appelman 3b1df29318 sort expected result in tests 2014-02-13 13:56:02 +01:00
Robin Appelman d6576c640c Add unit tests for JobList 2014-02-12 13:52:13 +01:00
Bart Visscher addd0fba38 number as number 2014-02-12 09:09:45 +01:00
Robin Appelman a6399f9cef Add the background job list to the public server container 2014-02-11 14:00:24 +01:00
Robin Appelman a7c50514ac Merge branch 'master' into convert-oc_appconfig 2014-02-11 13:26:54 +01:00
Arthur Schiwon 72f134cfce intendation 2014-02-11 10:50:10 +01:00
Arthur Schiwon 32afdcbefe Inject logger 2014-02-11 10:49:59 +01:00
Arthur Schiwon 9a39cd3b38 test for share dialoge sorter 2014-02-11 10:49:46 +01:00
Bart Visscher 082abdc620 Merge branch 'master' into migration_unit_tests 2014-02-10 21:32:17 +01:00
Robin Appelman 8ad3fc89be Merge branch 'master' into quota-space-root 2014-02-07 23:29:26 +01:00
Robin Appelman 4cdf83e6d2 Remove the Test_AppConfig_Object tests as they no longer make sense with caching 2014-02-07 14:03:57 +01:00
Robin Appelman b537d90e58 use the 'new' server container for appconfig 2014-02-07 13:45:59 +01:00
Vincent Petry be47e156a5 Merge pull request #6952 from MartialGeek/add_freebox_support
New user agent added for the Freebox.
2014-02-06 18:12:32 +01:00
Thomas Müller ced80c6f27 Merge pull request #6969 from owncloud/tests-morecoverage
Fixed unit test scripts + coverage
2014-02-04 12:21:13 -08:00
Robin Appelman 3afdcd85e7 Add unit test for quote wrapper size root 2014-02-04 16:05:12 +01:00
Bjoern Schiessle 36838b2837 add test for password remove method 2014-02-04 11:18:04 +01:00
Vincent Petry f7ac9f8069 Fixed unit test scripts + coverage
Tried to add more apps (others break).
"preprocessors" is now populated automatically based on the tested apps.
2014-01-30 11:56:14 +01:00
Martial Saunois 0f1c587e6b The regexp of the Freebox user agent is now more strict.
A new unit test has been added in consequence.
2014-01-29 10:58:34 +01:00
Martial Saunois 8507efc427 Unit tests added for the new Freebox user agent. 2014-01-28 21:08:27 +01:00
Jens-Christian Fischer 506393090b Add 'mail_from_address' configuration
In environments where there are rules for the email addresses, the "from
address" that owncloud uses has to be configurable.

This patch adds a new configuration variable 'mail_from_address'.
If it is configured, owncloud will use this as the sender of *all*
emails. (OwnCloud uses 'sharing-noreply' and 'password-noreply' by
default). By using the 'mail_from_address' configuration, only this
email address will be used.
2014-01-24 14:04:37 +01:00
Thomas Müller 9fa788c452 Merge pull request #6736 from owncloud/tests-jsunittests
Added Javascript unit tests
2014-01-23 12:43:05 -08:00
Thomas Müller 9bab05fd45 Merge branch 'master' into fixing-gallery-password-protected-access-master 2014-01-21 19:36:20 +01:00
Bjoern Schiessle 85269641db add first unit test for the versioning app 2014-01-21 16:22:08 +01:00
Thomas Müller a3ea5aa2ac fixing comment + adding unit test for checkPasswordProtectedShare 2014-01-21 12:07:08 +01:00
Thomas Müller f29bd1cb0b adding code coverage support 2014-01-21 00:57:18 +01:00
Jörn Friedrich Dreyer cdb7f40412 Merge pull request #6842 from owncloud/fix-quotes-again-master
Quote column names on adding description
2014-01-20 08:52:21 -08:00
Thomas Müller 99e068761a adding a comment to the database schema 2014-01-20 10:17:31 +01:00
Vincent Petry 1af7dab535 Fixed quota wrapper to not wrap failed fopen streams
When calling fopen() on some storage types, these return false instead
of throwing an exception.

This fix makes sure that in case the stream wasn't opened (for example
when a file doesn't exist any more) the stream isn't wrapped.

Also added 'rb' as another case that doesn't need to be wrapped.

Fixes #6832
2014-01-19 18:51:36 +01:00
Morris Jobke 3a2e03a7f0 Merge pull request #6784 from owncloud/fix-activation-of-unknown-apps
Fix activation of unknown apps
2014-01-18 08:13:57 -08:00
Vincent Petry 23e6578601 Fix array access syntax for older PHP
There was a syntax error when running tests in PHP 5.3.10.
2014-01-17 12:31:22 +01:00
Thomas Müller 817b49af58 don't enable files_external tests 2014-01-17 12:07:27 +01:00
Vincent Petry 350214c609 Added Javascript unit tests
- added karma utility to run jasmine unit tests
- added Sinon library (for stubs/mocks/fakeserver)
- added a few unit tests for core and files
- added autotest-js.sh script
2014-01-16 17:12:29 +01:00
Björn Schießle 32e941a2bc Merge pull request #6644 from ben-denham/unshare-all-fix
\OCP\Share::unshareAll() fix
2014-01-16 03:13:26 -08:00
Thomas Müller 5730e05a14 properly handle app activation for unit testing 2014-01-15 17:12:42 +01:00
Thomas Müller d4519125db Merge pull request #6744 from owncloud/fix_ocs_response_messages
keep response message
2014-01-15 03:17:24 -08:00
Vincent Petry 34559ef114 Merge pull request #6768 from owncloud/scanner-use-storage-mtime
Use storage_mtime when determining if we can reuse cached data while scanning
2014-01-15 01:31:33 -08:00
Robin Appelman 16b898ddb8 update another test 2014-01-14 20:19:05 +01:00
Bjoern Schiessle fc54335aff extended test to also check the status messages 2014-01-14 17:11:04 +01:00
Vincent Petry c3a0b0d7f3 Merge pull request #6704 from owncloud/encryptedfoldersizecalc
Fix calculated folder size to use unencrypted size
2014-01-14 07:20:16 -08:00
Robin Appelman 7e4c80fd60 use different value for mtime and storage_mtime in test 2014-01-14 15:13:21 +01:00
Robin Appelman 4113042c8f remove duplicate test class 2014-01-14 15:11:41 +01:00
Robin Appelman 203d5d01ca Use storage_mtime when determining if we can reuse cached data while scanning 2014-01-14 13:54:07 +01:00
Thomas Müller 70650a004a no warnings within unlinkDir() within the TestCleanupListener 2014-01-13 15:32:11 +01:00
ben-denham 30f77f53d5 updated the unit test for OCP\Share::unshareAll() to verify that shares by all users are removed for an item. 2014-01-10 14:08:29 +13:00
Vincent Petry 4faba49f0a Fix calculated folder size to use unencrypted size
The encrypted size was used when calculating folder sizes.
This fix now also sums up the unencrypted size and shows that one when
available.
2014-01-09 17:47:50 +01:00
blizzz d8b8abb429 Merge pull request #6681 from owncloud/userreport
add command line option to get user number statistics
2014-01-08 10:41:39 -08:00
Arthur Schiwon d7cb5ab080 add tests for user counting 2014-01-08 13:26:48 +01:00
Vincent Petry f642ad3961 Prevent deleting storage root
Storage mount points are not deletable, so make sure that the unlink
operation and its hooks aren't run in such cases.

Note that some storages might recursively delete their contents when
calling unlink on their root. This fix prevents that as well.
2014-01-08 13:17:36 +01:00
Vincent Petry 1614ad42b3 Merge pull request #6673 from owncloud/master-quota-insufficientstorageforfilesfix
Now also preventing to override "files" dir size with -1
2014-01-08 00:55:11 -08:00
Thomas Müller a7d0ab96c1 Merge pull request #6565 from owncloud/enable-ldap-unit-tests-master-2
enable ldap tests
2014-01-07 22:27:47 -08:00
Vincent Petry 5be4af9f51 Now also preventing to override "files" dir size with -1
Fixes #6526
2014-01-07 22:34:01 +01:00
Thomas Müller 2d5427efa9 Merge pull request #6290 from owncloud/files-androidcontentdisposition
Files androidcontentdisposition
2014-01-07 11:06:20 -08:00
tomneedham 528ff25ede Add WIP unit test for migration 2014-01-07 00:38:27 +00:00
Robin Appelman 6f6c3d1e44 Make OC_Avatar unit tests independent of currently loggedin user 2014-01-02 16:08:08 +01:00
icewind1991 14e0b1b6d1 Merge pull request #6513 from owncloud/user-no-change-displayname
Re-add the config options to remove the ability for users to change their displayname
2014-01-02 05:04:27 -08:00
Thomas Müller 97031ba45c Merge pull request #6520 from owncloud/tests-testcleanuplistener
Added test cleanup listener to detect untidy tests
2013-12-24 14:27:39 -08:00
Thomas Müller efdeba7416 Merge pull request #6449 from owncloud/core-appsorderfix
Fixed apps loading order
2013-12-24 14:26:11 -08:00
Thomas Müller dcded92c3e enable ldap tests 2013-12-24 22:21:50 +01:00
Andreas Fischer 4bc2a22317 Remove all uses of numRows(). 2013-12-21 19:56:14 +01:00
Vincent Petry c6377e9125 Fixed apps loading order
On SQLite the app order can be arbitrary and cause strange bugs.
On MySQL, the app order seems to be always alphabetical.

This fix enforces alphabetical order to make sure that all environments
behave the same and to reduce bugs related to app loading order.

Fixes #6442
2013-12-20 17:16:57 +01:00
Robin Appelman 0ed1b64673 Pass config object in testGetHomeNotSupported 2013-12-20 13:57:22 +01:00
Vincent Petry 1c340444a4 Added test cleanup listener to detect untidy tests
After each test suite, detects whether there are stray datafiles, hooks
or proxies, then show a warning and clear them.
2013-12-19 20:18:09 +01:00
Vincent Petry 09bd5bd517 Added isUserAgent() method to request
- added isUserAgent() method to OC_Request which makes it possible to
  test it
- OC_Response::setContentDisposition now uses OC_Request::isUserAgent()
2013-12-19 18:40:22 +01:00
Oliver Gasser cacb66480b Add unit tests for decimal type usage 2013-12-18 23:40:11 +01:00
Oliver Gasser f0962c99dc Increment number of columns by one 2013-12-18 00:37:09 +01:00
Oliver Gasser cb9e87eced Typo fixed 2013-12-17 23:46:36 +01:00
Oliver Gasser 5fcbe5350c Add decimal(precision,scale) column to unit tests 2013-12-17 23:08:05 +01:00
Thomas Müller 5a1194520e Merge pull request #6345 from owncloud/mysql-set-names-utf8-tests
DB tests: Test whether we can insert and read UTF8 data.
2013-12-17 01:54:30 -08:00
Thomas Müller ab4136f432 add missing quotes + field declarations 2013-12-17 10:05:20 +01:00
Arthur Schiwon c0edb639ed adjust test 2013-12-13 16:58:23 +01:00
Andreas Fischer 95dd58bfc0 Use old school query style that actually works. 2013-12-12 15:24:35 +01:00
Robin Appelman 46b72cbff0 remove unneeded ; in comment 2013-12-12 15:14:44 +01:00
Robin Appelman 30e0b474f8 Add test for having utf8 filenames in the cache 2013-12-12 13:43:55 +01:00
Andreas Fischer f8d3b7cb6f DB tests: Test whether we can insert and read UTF8 data. 2013-12-12 13:19:08 +01:00
Thomas Müller 28180485d9 Merge pull request #6244 from owncloud/memcached-connectivity-tests
Only run memcached tests if server is available.
2013-12-10 12:14:36 -08:00
Andreas Fischer 67310b60f7 Ensure memcached extension is there before attempting to create an instance. 2013-12-09 14:33:26 +01:00
Andreas Fischer a67c737848 Only run memcached tests if server is available. 2013-12-09 01:02:42 +01:00
Morris Jobke 67957294c2 fix wrong test data in l10n 2013-12-07 13:29:14 +01:00
blizzz 6a747106db Merge pull request #6150 from owncloud/backgroundjob-log-exception
Remove background jobs that are giving errors
2013-12-06 11:56:53 -08:00
Robin Appelman e888bdda30 get rid of failing test that don't cause additional downloads 2013-12-06 18:26:38 +01:00
Robin Appelman cf9b7e343a extend test case for etag preservation 2013-12-06 13:00:58 +01:00
Robin Appelman 01ab15a2b0 reuse etags when doing a background scan 2013-12-05 15:23:34 +01:00
Robin Appelman 2ff1bdaba3 add test case for removing background jobs that are throwing exceptions 2013-12-05 13:29:35 +01:00
Robin Appelman 3fa11bd426 Dont use exceptions for the backgroundjob test cases 2013-12-04 16:28:27 +01:00
Vincent Petry 6cf9844e9c Added unit test for the test() method
This is to make sure that method isn't broken
2013-12-03 14:35:53 +01:00
Thomas Müller 832be7c908 Merge pull request #6052 from owncloud/datetime-doctrine
Get rid of date strings for DB. Completely use Doctrine and DateTime.
2013-12-01 01:29:35 -08:00
Vincent Petry d69243ee51 Fixed FTP and SMB to use rmdir() when deleting folders
Some storages need to use different calls for deleting files or folders,
usually unlink() and rmdir().

Fixes #4532 (SMB dir deletion)
Fixes #5941 (FTP dir deletion)

Note that the extra is_dir() should be fast because it's read from the
stat cache.
2013-11-29 13:01:01 +01:00
Vincent Petry 43b1cf7988 Redetect mime type whenever extension is renamed 2013-11-27 21:34:51 +01:00
blizzz 4f15282bc9 Merge pull request #6058 from owncloud/ldap2avatar
Set Avatar for LDAP users automatically (if a picture is available)
2013-11-26 12:05:32 -08:00
Björn Schießle 1fef97f6a5 Merge pull request #6060 from owncloud/fix-6050-oc6
fixing getRawPathInfo() once more
2013-11-26 10:13:58 -08:00
Vincent Petry 2653d914d9 Merge pull request #6008 from owncloud/extstorage-smb-webdav-renamefix
Fixed SMB rename function to overwrite target file
2013-11-26 06:42:36 -08:00
Thomas Müller 2a93720f3f fixes #6050 2013-11-26 14:13:33 +01:00
Vincent Petry 712b47757a Updated unit tests for SMB
- coverage for touch return value
- fixed directory provider to exclude unsupported cases
2013-11-26 12:53:03 +01:00
Andreas Fischer 06df3822a0 Timestamp test is no longer necessary as we rely on Doctrine and DateTime. 2013-11-26 12:22:08 +01:00
Vincent Petry c3e34676ba Improved unit test for "overwrite on move"
Now using a different content to make sure the file was overwritten.
2013-11-25 18:54:58 +01:00
Vincent Petry af7118aa5d Added unit test for "overwrite file on rename/move"
Also fixed "rename" unit test that was ready the result out of the wrong
file.
2013-11-25 18:52:14 +01:00
Thomas Müller b9fed935b4 in case uri and script name don't match we better throw an exception 2013-11-25 14:42:34 +01:00
Thomas Müller a0a665ea45 handle duplicate slashes in case of reverse proxy configuration 2013-11-25 14:21:51 +01:00
Thomas Mueller 229630f14c adding simple unit test to test scriptName() under overwrite condition 2013-11-24 21:19:06 +01:00
Arthur Schiwon 8ccac86c98 Enable user backends to provide avatar images 2013-11-22 13:25:20 +01:00
blizzz 2f73db12bb Merge pull request #5040 from owncloud/public_api_avatar_master
Add public API for \OC\Avatar
2013-11-22 03:42:28 -08:00
Arthur Schiwon 00071401d7 Round out Avatar Public API 2013-11-21 23:40:25 +01:00
Vincent Petry 356eef0739 Quota storage wrapper is now used for all users in sharing mode
When accessing a shared folder, the folder's owner appears as mountpoint
but wasn't wrapped by a quota storage wrapper.

This fix makes sure that all home storages are wrapped by a quota
storage wrapper, if applicable, to make sure quotas are respected when
uploading into shared folders.
2013-11-21 12:04:54 +01:00
Vincent Petry 5b6d1d79d0 Fixed SMB file deletion success detection
Since unlink() smb4php doesn't return true on deletion success, we need
to check whether the file was deleted to confirm success.

Fixes #5866
2013-11-19 15:05:11 +01:00
Morris Jobke 4a0d295e4a Merge pull request #5927 from owncloud/quota-excludeextstorage
External storage space is now not counted in total space
2013-11-18 14:42:40 -08:00
Vincent Petry 3e2fd9942b Root size for home storage is now size of "files" subdir
Fixes #4593
2013-11-18 18:17:25 +01:00
Vincent Petry 614e4d485c External storage space is now not counted in total space
Added argument to getFileInfo() to disable adding the size of
mountpoints to a directory's size.

Fixes #5924
2013-11-18 18:09:01 +01:00
Bart Visscher 630e46f60a Merge pull request #5789 from ogasser/db_fix_default_for_numeric
DB: Set correct default value for numeric types
2013-11-15 04:19:33 -08:00
Thomas Müller 49e9f771ff Merge pull request #5813 from owncloud/fix-4736-master
Don't set a default value when there isn't a default specified
2013-11-15 01:06:38 -08:00
Thomas Müller 2bb4c266a6 Merge pull request #5862 from owncloud/files-singledotdirs
Files singledotdirs
2013-11-14 11:40:21 -08:00
Thomas Müller 7e63722534 make use of data providers 2013-11-14 15:37:30 +01:00
Vincent Petry d9ab964ff9 Added missing test with leading backslash 2013-11-14 15:36:03 +01:00
Vincent Petry c06d8bb007 Fixed normalizePath() to strip out single dot dirs
Now removing "/./" and trailing "/." from the paths when normalizing.
2013-11-14 13:15:03 +01:00
tomneedham 5a2d700866 Fix type in unit test 2013-11-14 01:11:22 +00:00
tomneedham 00944a376a Merge branch 'master' into oc_api_tests 2013-11-14 00:40:57 +00:00
tomneedham 959513fdc8 Add tests for OC_API::mergeResponses() 2013-11-14 00:40:09 +00:00
Vincent Petry 34c92f6656 Now using HomeStorage for legacy home storage ids
Legacy home storage ids with the format "local://path/to/datadir/user1"
are now also wrapped by the HomeStorage.
2013-11-12 18:01:02 +01:00
Robin Appelman 32a703ab36 Do not use -1 as the size for the root folder of the home storage 2013-11-12 16:15:43 +01:00
Morris Jobke 9c1c8d57f0 fix DB schema test - no default value 2013-11-12 13:45:28 +01:00
Oliver Gasser 95b3eb2c75 Add DB tests for default numeric
Add a table with a numeric column and an empty default directive.
2013-11-12 11:27:57 +01:00
Morris Jobke da20fb7922 Merge pull request #5707 from owncloud/fixwrongfilesizeintests
Fixed filesize issue in watchr test
2013-11-11 06:26:38 -08:00
Vincent Petry 7ff6a642b4 Fixed filesize issue in watchr test
Added clearstatcache to make sure we get the correct file size after
re-writing into the same file.

This failed on openSUSE 12.3 x86_64
2013-11-05 17:01:02 +01:00
Thomas Müller f91fe8d595 Merge pull request #5673 from owncloud/oc6-windows-server-mssql-master
Oc6 windows server mssql master
2013-11-05 00:41:11 -08:00
Thomas Mueller 665b7571f4 adding test for binary file to test \OC_Helper::streamCopy() 2013-11-04 17:19:04 +01:00
Andreas Fischer 8872b881cc Add tests for OCP\Share::unshareAll(). 2013-11-03 12:31:53 +01:00
Thomas Mueller 998211f7a3 WIN: fixing unit test for testStreamCopy() 2013-11-02 20:31:29 +01:00
Thomas Müller d25c8b43e6 Merge pull request #5652 from owncloud/front-port-5647-master
[WIP] extend unit test to directories starting or ending in whitespace
2013-11-01 23:11:33 -07:00
Jörn Friedrich Dreyer ae469b67a0 Merge pull request #5637 from owncloud/fix_privatedata
Fix privatedata
2013-10-31 10:26:47 -07:00
Jörn Friedrich Dreyer 10b2d649af extend unit test to directories starting or ending in whitespace 2013-10-31 14:24:43 +01:00
Thomas Müller 43d71aada8 testing update and delete 2013-10-31 11:09:52 +01:00
Thomas Müller bd5663bc3d adding unit tests for delete 2013-10-31 10:21:42 +01:00
Thomas Müller 8362afa94d unit tests for set added 2013-10-31 10:14:31 +01:00
Thomas Müller 7f64d858dd first two tests 2013-10-31 10:01:04 +01:00
Thomas Müller 261cd87efa Merge branch 'master' into home-storage 2013-10-30 22:11:19 +01:00
Jörn Friedrich Dreyer 7ba803919b Merge pull request #5625 from owncloud/fix-test-master
fix failing preview test on master
2013-10-30 09:07:07 -07:00
Morris Jobke b65b7965ae fix failing preview test on master 2013-10-30 15:39:55 +01:00
Robin Appelman c9f3f2874f Merge branch 'master' into update-parent-storage-mtime
Conflicts:
	lib/private/files/cache/updater.php
2013-10-30 13:41:10 +01:00
Bjoern Schiessle fcfac51aa1 backport of https://github.com/owncloud/core/pull/5513 2013-10-29 15:08:12 +01:00
Robin Appelman 654b0daf01 update touch tests for updated behaviour 2013-10-29 14:22:13 +01:00
Robin Appelman b3626f34cd Update the parent folders storage_mtime on write and delete to prevent rescans 2013-10-29 14:18:57 +01:00
Thomas Müller aaefb64306 Merge pull request #5493 from owncloud/fix-language-detection
Fix HTTP language detection
2013-10-28 16:37:12 -07:00
Robin Appelman f1e6e80eb1 add specialized storage backend for home folders 2013-10-29 00:14:23 +01:00
Vincent Petry c8df27de73 Fixed quota stream to not wrap read-only fopen calls 2013-10-25 12:33:16 +02:00
Vincent Petry d8b245490b Fixed quota stream's fseek method
- Added missing return statement
- Added missing support for SEEK_END
- Fixes #5524
2013-10-25 12:09:46 +02:00
Thomas Müller 66813e9df6 Merge branch 'master' into fix-language-detection 2013-10-24 19:27:33 +02:00
Thomas Müller caa3a8d784 Merge pull request #5464 from owncloud/fixing-5456-master
Fixing 5456 master
2013-10-23 10:50:36 -07:00
Andreas Fischer 8166aaf82c Some tests for OC_L10N::findLanguage() 2013-10-23 15:41:15 +02:00
Thomas Tanghus ad017285e1 Fix namespace for OCP\Appframework\Http
To avoid having to use OCP\Appframework\Http\Http in the public - and stable
- API OCP\Appframework\Http is now both a class and a namespace.
2013-10-23 05:57:34 +02:00
Thomas Müller f62c4eafa5 test cases added for create/remove Shared folder and file 2013-10-22 11:22:06 +02:00
Arthur Schiwon adbaaf85ea Test that dispayNamesInGroup(s) always returns uid as key in the result array 2013-10-20 20:56:25 +02:00
Thomas Müller b70d67d49a Merge pull request #5237 from owncloud/coverage-on-windows-master
PHP Code Coverage on windows master
2013-10-17 02:23:15 -07:00
Thomas Müller cdaa1db0d1 re-enable test in SecurityMiddlewareTest 2013-10-16 16:33:56 +02:00
Thomas Müller fdeef5e874 Merge branch 'master' into fixing-appframework-master
Conflicts:
	lib/private/appframework/middleware/security/securitymiddleware.php
	tests/lib/appframework/middleware/security/SecurityMiddlewareTest.php
2013-10-16 15:45:55 +02:00
Thomas Müller c3f7d22adc Merge pull request #5067 from owncloud/urlParams_fix
Get urlParams registered before Request is instantiated
2013-10-16 06:42:09 -07:00
kondou e2cc7e7bf9 Fix avatar unittest 2013-10-15 17:23:47 +02:00
Bjoern Schiessle 25320f19df Merge branch 'master' into avater_with_encryption 2013-10-15 11:53:51 +02:00
Bjoern Schiessle 0b8273c768 test should work now 2013-10-15 11:53:32 +02:00