Commit Graph

26 Commits

Author SHA1 Message Date
Vincent Petry b73df5846c
Add property scope tests for AccountManager
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:09 +01:00
Vincent Petry 278a73789e
Map old account scope properties to new names
Use new scope values in settings page.
Adjust all consumers to use the new constants.
Map old scope values to new ones in account property getter.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2021-03-26 13:07:08 +01:00
Joas Schilling a609074c18
Fix Test class name
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-12 08:53:43 +01:00
Joas Schilling f0ca76aefb
Add and fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:38 +01:00
Joas Schilling da9462b482
Make code strict
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-12-07 14:19:37 +01:00
Joas Schilling 8027dcbc6f
Don't leave cursors open when tests fail
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-11-09 12:28:17 +01:00
Joas Schilling 4bc821edd9
PSR logger for accounts
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-20 17:41:47 +02:00
Morris Jobke 234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +02:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +02:00
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +02:00
Christoph Wurst b97d90e0c3
Log critical fallback to user default if we can't parse the JSON
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-13 12:39:29 +01:00
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +01:00
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +01:00
Roeland Jago Douma 68748d4f85
Some php-cs fixes
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +01:00
Julius Härtl b9a87a69cf
Use IAccountManager constants
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-15 13:30:31 +02:00
Julius Härtl 9381e681a9
Add tests for new account api classes
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-10-15 13:30:31 +02:00
Morris Jobke 43e498844e
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +02:00
Bjoern Schiessle 5fa0e6df39
fix email verification status
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:37 -03:00
Bjoern Schiessle 71657db4be
updated unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-04-28 23:41:36 -03:00
Lukas Reschke afb5d45705 Merge pull request #4256 from nextcloud/theming
Move OC_Defaults to OCP\Defaults
2017-04-11 14:39:46 +02:00
Joas Schilling bc217cdf87
Also send the new account data with the event
Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-10 10:22:57 +02:00
Morris Jobke 5b4adf66e5
Move OC_Defaults to OCP\Defaults
* currently there are two ways to access default values:
  OCP\Defaults or OC_Defaults (which is extended by
  OCA\Theming\ThemingDefaults)
* our code used a mixture of both of them, which made
  it hard to work on theme values
* this extended the public interface with the missing
  methods and uses them everywhere to only rely on the
  public interface

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-09 21:43:01 -05:00
Bjoern Schiessle 0de685c562
bring back setEmailAddress for the user management
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-25 10:26:48 +01:00
Bjoern Schiessle 3fc75073b8
update accounts table if email address or display name changes from outside
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-25 10:26:47 +01:00
Bjoern Schiessle 08e6541a88
fix unit tests
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-21 11:29:58 +01:00