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>
3 роки тому
Morris Jobke
e4144e6b36
Remove deprecated test of internal attributes via assertAttributeEquals
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 роки тому
Daniel Kesselberg
87dd760a89
Replace TYPE with TYPES
As TYPE::* is deprecated.
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
4 роки тому
Joas Schilling
89ed2c37bf
Update share type constant usage
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 роки тому
Joas Schilling
c68718f90c
Remove dropped " ON " when join has no condition
Signed-off-by: Joas Schilling <coding@schilljs.com>
4 роки тому
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 роки тому
Christoph Wurst
14c996d982
Use elseif instead of else if
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Christoph Wurst
23eb0462e5
Use lowercase true, false and null constants
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 роки тому
Joas Schilling
059968e1c7
Pick a shorter name for the transfer ownership table
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 роки тому
Roeland Jago Douma
469c06be15
TO REVERT LATER: disable decimaltest from LegacyDBTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 роки тому
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 роки тому
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
4 роки тому
Robin Appelman
9e450d727a
add LEAST and GREATER to db function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 роки тому
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>
4 роки тому
Robin Appelman
8ef5a366ec
add MAX and MIN to functionbuilder
Signed-off-by: Robin Appelman <robin@icewind.nl>
4 роки тому
Joas Schilling
85a0e10b4f
Update the tests to the comparison logic
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 роки тому
Morris Jobke
8e60006744
Exception is not thrown anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
5 роки тому
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
Signed-off-by: Joas Schilling <coding@schilljs.com>
5 роки тому
Daniel Kesselberg
04a316aa67
Add test that unique constraint is working
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
5 роки тому
Roeland Jago Douma
fe286e21ca
Fix tests
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 роки тому
Joas Schilling
008c8dde1a
Ignore custom prefixes which are longer
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Joas Schilling
960961148e
Fix calculation of default name
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Joas Schilling
14682dfa7c
Add unit tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Robin Appelman
3047ef31bd
Add count to function builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 роки тому
Morris Jobke
a4cb83df27
Add tests for special domain name
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 роки тому
Morris Jobke
d686b19a16
Add tests for domains
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 роки тому
Joas Schilling
78ee3abb78
Move regex to a function and add tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Robin Appelman
89a9d35d90
dont keep shared database locks when running cli scripts
For cli scripts we don't have the assumption that the universe will be cleaned up soon
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 роки тому
Morris Jobke
2b335fd607
Use insertIfNotExist of the new interface
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 роки тому
Joas Schilling
bf2be08c9f
Fix risky tests without assertions
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Joas Schilling
4a5282ba21
Fix the type hints of migrations and correctly inject the wrapped schema into migrations
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Robin Appelman
42b3aa3a0a
reuse query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 роки тому
Robin Appelman
aad01894e3
refactor user searching
add additional user searching tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 роки тому
Robin Appelman
da3004b8f5
add postgresql10 compatibility to dbal
Signed-off-by: Robin Appelman <robin@icewind.nl>
6 роки тому
Piotr Mrowczynski
6a51c1bc4f
Add foreign key support to OC
6 роки тому
Joas Schilling
a3bdb318e9
Fix bigint handling on postgres
Signed-off-by: Joas Schilling <coding@schilljs.com>
6 роки тому
Joas Schilling
293dea0625
Fix querybuilder and functionbuilder tests
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 роки тому
Morris Jobke
163e8774a4
Fix autoloader and namespace test
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 роки тому
Joas Schilling
4e5cd1efea
Fix tests of CodeChecker and MigrationService
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 роки тому
Joas Schilling
15eec7b83c
Start migrations
Fixme:
- Install and update of apps
- No revert on live systems (debug only)
- Service adjustment to our interface
- Loading via autoloader
Signed-off-by: Joas Schilling <coding@schilljs.com>
7 роки тому
Robin Appelman
48df99f2e0
fix quote helper test
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 роки тому
Robin Appelman
d4a7cfec7c
rename fun to func
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 роки тому
Robin Appelman
fee818f493
Add tests for query builder (i)like
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 роки тому
Robin Appelman
4279b13270
Add function builder to the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 роки тому
Robin Appelman
a65652fc1e
add support for escaping like parameters when using the query builder
Signed-off-by: Robin Appelman <robin@icewind.nl>
7 роки тому
Morris Jobke
713f684a8b
Adding tests for 4 byte unicode characters
* success on SQLite and Postgres
* failure on MySQL due to the limited charset that only supports up to 3 bytes
Add config option to update charset of mysql to utf8mb4
* fully optional
* requires additional options set in the database
only disable unicode test on mysql
Fixing ctor call
Adding docker based unit test execution for mysql utf8mb4
Add mysqlmb4 test configuration to Jenkinsfile
fix collation on utf8mb4
Properly setup charset and collation in the doctrine connection
Allow files containing 4-byte chars in case the database supports it
During setup of a mysql database we try to detect if charset 'utf8mb4' can be used
Fix mysql settings
Add console command to migrate the charset
Set ROW_FORMAT before setting collation to mb4
Also select tables with wrong collation
Faster MySQL docker
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
9 роки тому
Morris Jobke
d99ce3971b
Namespace and array syntax fixes
* minor fixes in preparation of a bigger DB and config PR
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
7 роки тому