Commit Graph

29 Commits (8d5165e8dc40289b5d523523c4140f780b2fe293)

Author SHA1 Message Date
Côme Chilliet 8d5165e8dc
Adapt tests to config value typing
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet dde5c46a3e
Migrate to Symfony Mailer
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 year ago
Côme Chilliet 6f80fe6ada
Remove deprecated at matcher from tests/lib
Only 15 warnings left in there

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Carl Schwan 9b8ca9ad1f
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
findBinaryFinder is now a service that is still private but with some
minor optimization (remove the hasKey check).

isFunctionEnabled is now in OCP\Util

Both function are still keep but all internal usage in nextcloud/server
were migrated to the new usage, so that we can remove it in 26

Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2 years ago
Côme Chilliet 61f7f13bd8
Migrate from ILogger to LoggerInterface where needed in the tests
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
Daniel Kesselberg 747325fc43
Set local domain for swiftmailer transport
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
3 years ago
Christoph Wurst 883848b58a
Micro-optimize validation of empty email addresses
Then we don't have to construct any validators.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
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>
4 years ago
Roeland Jago Douma bb4dedb015
Provide the proper language to the mailer
Else we can't properly translate the footer in the recipients e-mail
language.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 years ago
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>
4 years ago
Christoph Wurst 41b5e5923a
Use exactly one empty line after the namespace declaration
For PSR2

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
Remove unused imports
4 years ago
Christoph Wurst 2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 74936c49ea
Remove unused imports
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Arne Hamann a16aa99586
Added Hook before Message is send
Signed-off-by: Arne Hamann <kontakt+github@arne.email>
4 years ago
Roeland Jago Douma 3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
Branko Kokanovic 7cef9b0248 Addressing comments, array() to []
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
6 years ago
Branko Kokanovic 72d97b44a7 Expose Swift Mailer streaming options in config, fixes #12702
Signed-off-by: Branko Kokanovic <branko@kokanovic.org>
6 years ago
Daniel Kesselberg 4a2c56b714
Add testcases for pipe mode
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
6 years ago
Roeland Jago Douma 054056a8df
Fallback to default path is sendmail can't be found
If the sendmail binary can't be found at all we fallback to the default
path.
It most likely is not there but then at least a proper error message
pops up.

Updated the tests to also properly pass.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Roeland Jago Douma be7db1573d
Swift to \Swift_Mailer as abstraction
* \Swift_Mailer handles starting the transport etc properly
* Fixed tests

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Morris Jobke 9ee1febf62
Provide an option to disable HTML emails
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Roeland Jago Douma 0c500e460f
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
Joas Schilling dea011243e
Fix unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Lukas Reschke 3600dd4f52
Add IEMailTemplate to public OCP API
Also adds `\OCP\Mail\IMailer::createEMailTemplate` as helper so the functionality can easily be used within apps.

Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
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>
7 years ago
Joas Schilling a113f951d6
Adjust the tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 years ago
Joas Schilling 94ad54ec9b Move tests/ to PSR-4 (#24731)
* Move a-b to PSR-4

* Move c-d to PSR-4

* Move e+g to PSR-4

* Move h-l to PSR-4

* Move m-r to PSR-4

* Move s-u to PSR-4

* Move files/ to PSR-4

* Move remaining tests to PSR-4

* Remove Test\ from old autoloader
8 years ago