Commit Graph

13 Commits (8b4d49cf506d202c4b7ab58f453cdc84a30bca38)

Author SHA1 Message Date
Ferdinand Thiessen 00e041b907 feat(template): Allow `JSResourceLocator` to find ES6 scripts
Enable module js (ES6) support on the `JSResourceLocator`.
This changes `JSResourceLocator` to look for `.mjs` files first
to allow applications to provide a fallback `.js` for older Nextcloud versions.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
1 year ago
Julius Härtl 4bcaeb6c2c
Drop 3rdparty root since it is unused and adjust tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
1 year 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
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 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
Morris Jobke 761cdf9877
Remove deprecated test of internal attributes via assertAttributeEquals in constructor tests
I removed the tests completely because they just test that the constructor assigns the values to the internal properties. Nothing that should be cared about from the outside.

See https://github.com/sebastianbergmann/phpunit/issues/3339#issuecomment-428843322

It is seen as bad practice to test internal stuff of objects instead of the actual input and output of mathod calls.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
4 years ago
Christoph Wurst 2fbad1ed72
Fix (array) indent style to always use one tab
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Roeland Jago Douma c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
5 years ago
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>
5 years ago
Julius Härtl 95366bbd1f
Fix tests to use ICacheFactory
Signed-off-by: Julius Härtl <jus@bitgrid.net>
6 years ago
Kyle Fazzari 9c24b7be2d
tests: change helper scope
This seems to be the only way to have the same helpers used between
tests in a manner that works for both standalone phpunit and
autotest.sh.

Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
7 years ago
Kyle Fazzari 06ba1a8a02
JSResourceLocator: account for symlinks in app path
Signed-off-by: Kyle Fazzari <kyrofa@ubuntu.com>
7 years ago