Commit graph

728 commits

Author SHA1 Message Date
Andreas Fischer
114e9d4403 Adjust return value tests for checkPassword() to what OC_User_Example says. 2013-10-08 19:57:37 +02:00
Andreas Fischer
1f11dc7200 Use parent:: in Test_User_Database::getUser(). 2013-10-08 19:36:37 +02:00
Andreas Fischer
46cd3082b0 Test_User_Backend::getUser() does not return an array, it returns a string. 2013-10-08 19:36:37 +02:00
Andreas Fischer
00a0588807 Test OC_User_Database in Test_User_Database instead of OC_User_Dummy. 2013-10-08 19:36:37 +02:00
Victor Dubiniuk
176c2f1502 Add unit tests 2013-10-08 16:33:56 +03:00
Thomas Müller
053b55721d Merge branch 'master' into fixing-appframework-master 2013-10-08 12:13:24 +02:00
Thomas Müller
c77f74e1de adding check isDeletable() on $sourcePath 2013-10-08 11:43:44 +02:00
Thomas Müller
1e47468c53 Merge pull request #4974 from owncloud/fixing-4011-master
error handling added in case file_put_contents is failing
2013-10-07 02:58:00 -07:00
Thomas Müller
3ea2dfa5f9 remove getTrans() from API class 2013-10-07 11:36:38 +02:00
Thomas Müller
1e5012fc1d fixing all appframework unit tests 2013-10-07 11:25:50 +02:00
Thomas Tanghus
c85621a897 Make abstract Middleware class public
It doesn't make sense for subclasses to have to implement
all methods.
2013-10-05 16:59:06 +02:00
Frank Karlitschek
a82211220c Merge pull request #5125 from owncloud/fixing-5122-master
upload abortion detection only for PUT
2013-10-05 02:25:45 -07:00
Thomas Müller
414b2eb4b6 upload abortion detection only for PUT
e.g. LOCK would break with this approach
2013-10-04 20:20:33 +02:00
Bart Visscher
bae121b16d Merge pull request #5068 from owncloud/improved_request
Improved request
2013-10-04 09:05:20 -07:00
Björn Schießle
2cdf54b77d Merge pull request #4877 from owncloud/ocs_share_api
OCS Share API
2013-10-04 07:10:21 -07:00
Thomas Müller
aebc330f26 Merge branch 'master' into fixing-4011-master 2013-10-04 14:06:42 +02:00
Vincent Petry
b0bb64c3ee Added unit tests for relative_modified_date, changed method signature
Changed method signature of relative_modified_date template method to
make it possible to add a fromTime to compare with, mostly to make it
possible to test it.

Added unit test for date and time cases.
2013-10-03 13:55:05 +02:00
Thomas Tanghus
aedc427ffd Fix fix of POST :P 2013-10-03 03:56:37 +02:00
Thomas Tanghus
965ce5719f Modified PUT behaviour
Now only non-parable PUT requests return a stream resource.
2013-10-02 22:13:40 +02:00
Morris Jobke
ceeb22aa5f fix unit tests 2013-10-02 11:25:44 +02:00
Thomas Tanghus
7cd8088845 Add assertions for ->params and array access with json 2013-10-01 20:15:03 +02:00
Thomas Tanghus
973bcccd7c Implement PUT an PATCH support 2013-10-01 20:13:13 +02:00
Thomas Tanghus
bdad7697ac Check if accessor matched request method.
It's easier to find errors in the code if an exception is thrown.
2013-10-01 20:13:13 +02:00
Thomas Tanghus
8603f956ab Get urlParams registered before Request is instantiated 2013-10-01 19:03:34 +02:00
Thomas Müller
9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00
Thomas Müller
480aeb804f Merge pull request #4459 from owncloud/appframework-master
Public API for OC6+ (includes AppFramework)
2013-09-30 04:11:28 -07:00
Thomas Müller
c62dc4fa80 Merge branch 'master' into fixing-4011-master
Conflicts:
	lib/connector/sabre/directory.php
2013-09-30 11:36:08 +02:00
Thomas Müller
fdc87eaeb3 adding test testSimplePutFailsOnRename() 2013-09-30 11:30:34 +02:00
Thomas Müller
e3dee63339 Merge branch 'master' into fixing-4011-master
Conflicts:
	lib/connector/sabre/directory.php
	lib/connector/sabre/file.php
2013-09-30 10:46:50 +02:00
Thomas Müller
629faf6d34 Merge branch 'master' into appframework-master 2013-09-30 10:42:05 +02:00
Thomas Müller
952433eae6 Merge branch 'master' into move-aborted-upload-detection-into-plugin-master 2013-09-30 09:21:37 +02:00
Thomas Müller
5899485ca1 Merge pull request #4969 from owncloud/fixing-4043-master
adding privilege check on move and rename operations
2013-09-30 00:20:34 -07:00
Andreas Fischer
9ba0edcadb Merge pull request #4966 from owncloud/text_preview_blacklist
add blacklist to txt preview backend

* owncloud/text_preview_blacklist:
  rename variable in testIsTransparent
  rename testTxtBlacklist to txtBlacklist
  move fileView object initialization to testIsTransparent
  use dataProvider for txt blacklist test
  add test for txt blacklist
  add test data for cal and contact preview
  add blacklist to txt preview backend
2013-09-29 23:20:34 +02:00
Thomas Müller
6979fd343b Merge branch 'master' into appframework-master 2013-09-28 20:39:19 +02:00
Georg Ehrke
c5bcefe4db rename variable in testIsTransparent 2013-09-27 14:55:37 +02:00
Thomas Müller
687ba053b7 Merge branch 'master' into appframework-master 2013-09-27 14:25:47 +02:00
Thomas Müller
79da35b698 code cleanup 2013-09-27 13:41:23 +02:00
Thomas Müller
1ec7dff2fe remove unused setUp() 2013-09-27 13:30:09 +02:00
Georg Ehrke
4e9296a484 rename testTxtBlacklist to txtBlacklist 2013-09-27 11:33:37 +02:00
Georg Ehrke
1b13101096 move fileView object initialization to testIsTransparent 2013-09-27 11:01:47 +02:00
Georg Ehrke
aa8a145ba8 use dataProvider for txt blacklist test 2013-09-27 09:59:04 +02:00
Andreas Fischer
1a398fba67 phpunit.xml: Port code coverage excludes from autotest to dist. 2013-09-26 19:05:47 +02:00
Morris Jobke
3dd19c7758 Merge pull request #4999 from owncloud/run-unit-tests-for-apps-master
run unit tests for apps as well
2013-09-26 07:09:32 -07:00
Thomas Müller
f8933eaf92 Remove $RUNTIME_NOAPPS - setting to false was not enough 2013-09-26 14:03:04 +02:00
Bjoern Schiessle
b9d6539d76 Merge branch 'master' into ocs_share_api 2013-09-26 13:02:39 +02:00
Thomas Müller
d1b5d65622 run unit tests for apps as well 2013-09-26 12:02:06 +02:00
Thomas Müller
b11d8799c1 adding unit tests for ObjectTree::move() 2013-09-26 10:50:15 +02:00
Thomas Müller
469b309b21 Merge pull request #4892 from owncloud/vcategories_public
OC_VCategories => OC\Tags. Public interface and getter in server container
2013-09-25 14:24:37 -07:00
Arthur Schiwon
b5ac672864 Missing Test for the previous commit 2013-09-25 19:15:27 +02:00
Thomas Müller
826c6bec8f expect unlinkto be called 2013-09-25 17:41:16 +02:00
Thomas Müller
3fa5271f10 adding unit tests 2013-09-25 17:34:28 +02:00
Georg Ehrke
9e4fe10329 add test for txt blacklist 2013-09-25 10:20:40 +02:00
Thomas Müller
db39fede97 Merge branch 'master' into appframework-master
Conflicts:
	apps/files/lib/helper.php
	apps/files_trashbin/lib/helper.php
2013-09-25 09:52:12 +02:00
Thomas Tanghus
aaed871cee Add factory class for the server container. 2013-09-24 17:10:01 +02:00
Arthur Schiwon
14a160e176 Adjust Tests and satisfy them 2013-09-24 17:10:01 +02:00
Thomas Müller
ee75a5b134 adding basic unit test for failing file_put_content operation 2013-09-24 15:44:02 +02:00
Arthur Schiwon
d101ff42f1 User: move checkPassword from User to Manager to not break API 2013-09-24 13:46:30 +02:00
Georg Ehrke
52f1d5856d add test data for cal and contact preview 2013-09-24 13:26:51 +02:00
Robin Appelman
235517f111 clear permissions cache when scanning a file 2013-09-24 00:57:58 +02:00
Thomas Tanghus
f022ea752d Moar tests. 2013-09-23 23:39:36 +02:00
Thomas Tanghus
8fab9eef28 Add another test. 2013-09-23 23:39:36 +02:00
Thomas Tanghus
1bbeb12e2e Updated method names and added a few more tests. 2013-09-23 23:39:36 +02:00
Thomas Tanghus
45f73feb69 OC_VCategories=>OC\Tags. Public interface + getter in server container 2013-09-23 23:39:36 +02:00
Thomas Müller
5d671a84b2 Merge pull request #4869 from owncloud/fixing-4866-master
recreate an etag within the scanner if the cache contains an empty etag
2013-09-23 07:13:12 -07:00
Andreas Fischer
437858852c Merge pull request #4856 from owncloud/fix-link-expiration
Fix Sharing "Expiration Date" for Shares of type Link (i.e. Token)

* owncloud/fix-link-expiration:
  Perform expiration date checking before returning share data for token.
  Tests whether expired/valid link share is still accessible.
2013-09-23 15:12:38 +02:00
Andreas Fischer
d9a36ee82e Move setUp() and tearDown() up in tests/lib/files/cache/scanner.php. 2013-09-23 12:45:02 +02:00
Andreas Fischer
4a9f1cc74d Merge remote-tracking branch 'owncloud/master' into fixing-4866-master
* owncloud/master: (98 commits)
  [tx-robot] updated from transifex
  files: when filtering search results, ensure results are children of the fakeroot not just path starting the same
  setting a default on filecache column unencrypted_size
  [tx-robot] updated from transifex
  remove unneccessary lib in namespace
  namespaces use upcasefirst parts when _ is left in namespace and files are named after their classes the autoloader will also find classes in the lib folder of an app its magic!
  initialize variable
  calculate correct permissions while toggle the password protection
  make sure that both $permissions and $oldPermissions have the same type
  Add copyright, remove starting blank line
  update inherit docs comment
  Fix insert/update/delete helper functions for oracle
  Add missing return true statements to legacy preferences functions
  Add missing static
  Convert OC_Preference to object interface
  fix race condition in lazy preview loading
  use {count} instead of 'One' for more versatile translation
  fix double translation of error message
  use n to translate title
  fixing typos and l10n
  ...

Conflicts:
	tests/lib/files/cache/scanner.php
2013-09-23 12:44:11 +02:00
Thomas Müller
03eedb58fc Merge pull request #4327 from owncloud/scanfile-remove
remove deleted files while scanning
2013-09-22 22:40:13 -07:00
Bart Visscher
811f680457 Merge pull request #4623 from owncloud/convert-oc_preferences
Convert OC_Preference to object interface
2013-09-22 10:45:56 -07:00
Robin Appelman
a1d4eb1f95 files: when filtering search results, ensure results are children of the fakeroot not just path starting the same 2013-09-22 01:24:12 +02:00
Andreas Fischer
de2e6e137b Do not convert boolean to integer in tests. put() already does this. 2013-09-21 00:12:13 +02:00
Thomas Müller
d84d548618 when storing back the data field 'encrypted' it is necessary to cast the boolean to an integer to make pg happy 2013-09-20 20:34:17 +02:00
Bart Visscher
445d34a2a9 Convert OC_Preference to object interface 2013-09-19 18:13:06 +02:00
Bjoern Schiessle
b947aab802 some unit test for the new ocs share api 2013-09-19 14:39:51 +02:00
Thomas Müller
1274d6116d updating php docs 2013-09-18 22:22:51 +02:00
Thomas Tanghus
dd62ccdb4e Merge branch 'appframework-master' into public_cache
Conflicts:
	lib/public/iservercontainer.php
	lib/server.php
2013-09-18 13:20:07 +02:00
Thomas Tanghus
8b4f4a79e2 Still some session leftovers. 2013-09-17 19:46:08 +02:00
Thomas Tanghus
fe86182dac OC_Cache namespace changes and add UserCache to server container.
Refs #4863
2013-09-17 17:46:33 +02:00
Thomas Müller
4cd0ee47a8 Merge branch 'master' into appframework-master 2013-09-17 09:39:45 +02:00
Thomas Müller
c8f9efeb94 etag changes are now propagated up the file tree 2013-09-16 23:32:17 +02:00
Andreas Fischer
07714d9a72 Tests whether expired/valid link share is still accessible. 2013-09-16 21:24:16 +02:00
Bart Visscher
9d18e16c77 Merge pull request #4825 from owncloud/fix-sharing-expiration-oracle
Fix Sharing "Expiration Date" on Oracle
2013-09-16 12:16:44 -07:00
Thomas Müller
3c026b7cf6 recreate an etag within the scanner if the cache contains an empty etag 2013-09-16 12:09:15 +02:00
Thomas Müller
ad82a56f79 Merge branch 'master' into appframework-master 2013-09-15 21:18:59 +02:00
Bernhard Posselt
a58e176852 Merge pull request #4506 from owncloud/oc_avatars
OC Avatars
2013-09-14 16:00:36 -07:00
Thomas Müller
4480b0b164 Merge branch 'master' into appframework-master 2013-09-13 23:31:59 +02:00
Thomas Müller
6ff07f7681 Merge pull request #4712 from owncloud/fileapi-foreward
Provide an implementation of the fileapi for oc6 build on top of the old api
2013-09-13 14:31:11 -07:00
Thomas Müller
6eeb4d165c - giving the user a new id for each test run in order to prevent reuse of e.g. permissions data in the database
- setting the current user id because \OC\FilesView relies on \OC_User::getUser()
2013-09-13 21:44:31 +02:00
Thomas Müller
5b3388c7c4 Merge branch 'master' into appframework-master 2013-09-13 20:56:49 +02:00
Thomas Müller
8c9add4d32 adding TB and GB to OC_Helper::humanFileSize 2013-09-13 17:22:45 +02:00
Andreas Fischer
294f3632e0 Calculate dateInPast and dateInFuture. 2013-09-12 23:43:21 +02:00
Andreas Fischer
20b799b2b4 Compare objects directly. Also use $expected and $actual. 2013-09-12 23:43:21 +02:00
Andreas Fischer
bd1163b7d5 Add database tests for INSERT/SELECT date format. 2013-09-12 23:43:21 +02:00
Andreas Fischer
261766fe49 Add comment explaining how $dateInFuture was picked. 2013-09-12 23:43:20 +02:00
Andreas Fischer
f567bd1b8a Coding style: { for methods start are supposed to be on the same line. 2013-09-12 23:43:20 +02:00
Andreas Fischer
fb650deaf7 Expiration tests for sharing with groups. 2013-09-12 23:43:20 +02:00
Andreas Fischer
cf97eac401 Do not repeat shareUserOneTestFileWithUserTwo() code. 2013-09-12 23:43:20 +02:00
Andreas Fischer
e4b334c3f1 Make dates test class properties. 2013-09-12 23:43:20 +02:00
Andreas Fischer
924a7046dd Try to make Oracle happy by also specifying seconds. 2013-09-12 23:43:20 +02:00
Andreas Fischer
1358b0078a Test whether a still-valid user share is still accessible. 2013-09-12 23:43:20 +02:00