1
0
mirror of synced 2024-12-05 03:06:05 +03:00
Commit Graph

3427 Commits

Author SHA1 Message Date
Marco Pivetta
d024193cc0 Merge pull request #1272 from Ocramius/hotfix/DDC-2704-merge-inherited-transient-properties
[DDC-2704] - merge inherited transient properties - merge properties into uninitialized proxies
2015-01-25 05:55:53 +01:00
Marco Pivetta
5bf18298b1 Merge pull request #1281 from Ocramius/hotfix/#1169-extra-lazy-one-to-many-should-not-delete-referenced-entities
Hotfix/#1169 extra lazy one to many should not delete referenced entities
2015-01-25 05:43:34 +01:00
Marco Pivetta
7e85c94f48 #1169 DDC-3343 - adapting cached collection persister logic to EXTRA_LAZY collection behavior 2015-01-25 04:40:30 +01:00
Marco Pivetta
dff365318d #1277 DDC-3346 DDC-3531 - enforcing 0 offset to avoid persisting more than 1 row 2015-01-24 14:39:47 +01:00
Marco Pivetta
186c593058 #1277 DDC-3346 DDC-3531 - proper bi-directional association setup 2015-01-24 14:39:46 +01:00
Marco Pivetta
39a8941d1b #1277 DDC-3346 DDC-3531 - minor CS fixes/cleanups: avoiding setters 2015-01-24 14:39:46 +01:00
Marco Pivetta
04a271a04e #1277 DDC-3346 DDC-3531 - refactoring test assets for readability 2015-01-24 14:39:46 +01:00
Marco Pivetta
36bc448880 #1277 DDC-3346 DDC-3531 - refactoring test code for simplicity/readability 2015-01-24 14:39:46 +01:00
Marco Pivetta
16f447d1ac #1277 DDC-3346 DDC-3531 - correct usage of the model set (setUp/tearDown of model-related tables) 2015-01-24 14:39:46 +01:00
Marco Pivetta
6e3ad496e2 #1277 DDC-3346 DDC-3531 - constants over string references 2015-01-24 14:39:45 +01:00
Marco Pivetta
157bf203bc #1277 DDC-3346 DDC-3531 - additional tests for LIMIT and OFFSET repository API (must not hydrate collections) 2015-01-24 14:39:45 +01:00
Pavel Batanov
981cebbf4c Update test according to @Ocramius notes 2015-01-24 14:39:43 +01:00
Pavel Batanov
e36c7b0c2a DDC-3346 failing test example 2015-01-24 14:39:42 +01:00
Marco Pivetta
28e0da4321 #1272 DDC-2704 - reverting classmetadata API changes (moved all to reflection property getter API) 2015-01-24 14:32:23 +01:00
Marco Pivetta
05a8e1c77d #1272 DDC-2704 - test assets for the property getter utility tests 2015-01-24 14:30:07 +01:00
Marco Pivetta
1b0a5e38d9 #1272 DDC-2704 - specification for a property getter utility 2015-01-24 14:28:54 +01:00
Marco Pivetta
91f4ed8b92 DDC-2704 - data should be merged only into initialized proxies 2015-01-24 13:22:16 +01:00
Marco Pivetta
21995a8b10 DDC-2704 - more explicit value checking 2015-01-24 13:22:16 +01:00
Marco Pivetta
30dcece125 DDC-2704 - covering code handling class metadata skipping of static properties 2015-01-24 13:22:16 +01:00
Marco Pivetta
3df9b4d122 DDC-2704 - synchronized model classes to new test code 2015-01-24 13:22:16 +01:00
Marco Pivetta
bd667b82d9 DDC-2704 - carefully checking defined classes in getAllReflectionProperties 2015-01-24 13:22:16 +01:00
Marco Pivetta
1e6c071bb8 DDC-2704 - trying to get all reflection properties from a partially initialized class metadata instance will result in a failure 2015-01-24 13:22:15 +01:00
Marco Pivetta
4e08c99b86 DDC-2704 - trying to get all reflection properties from an unitialized class metadata instance will result in a failure 2015-01-24 13:22:15 +01:00
Marco Pivetta
5ae980e0f9 DDC-2704 - reducing test case clutter 2015-01-24 13:22:15 +01:00
Marco Pivetta
302e6218bb DDC-2704 - renaming test case for clarity 2015-01-24 13:22:15 +01:00
Marco Pivetta
942004226c DDC-2704 - basic test case verifying that merged transient properties are not handled when in an inheritance 2015-01-24 13:22:15 +01:00
Marco Pivetta
6a1755972d Revert "Merge branch 'hotfix/#1220-sort-paginator-subquery-output-only-once'"
This reverts commit 8f097ab304, reversing
changes made to b23a8dd429.

Conflicts:
	tests/Doctrine/Tests/ORM/Tools/Pagination/LimitSubqueryOutputWalkerTest.php
2015-01-24 13:10:25 +01:00
Austin Morris
c8160fcd0e Failing test for an ORDER BY that is INNER JOINED in a subquery 2015-01-24 13:07:56 +01:00
Marco Pivetta
01a9dadee7 #1169 DDC-3343 - removed unused imports 2015-01-24 12:54:40 +01:00
Marco Pivetta
b7b716a6bb #1169 DDC-3343 - moved tests to correct test class 2015-01-24 12:53:48 +01:00
Marco Pivetta
d443d4f3b6 #1169 DDC-3343 - additional test cases: removing proxies from an extra-lazy collection still updates the owning side values 2015-01-24 12:21:21 +01:00
Marco Pivetta
6a2b7c2a8e #1169 DDC-3343 - correcting query count assertions on extra-lazy specific tests (some DELETE operations became UPDATE operations) 2015-01-24 12:20:33 +01:00
Marco Pivetta
99c5650ba4 #1169 DDC-3343 - removing duplicate test 2015-01-24 11:59:21 +01:00
Marco Pivetta
a8796fa489 #1169 DDC-3343 - integrating tests into the existing test suite 2015-01-24 11:58:57 +01:00
Marco Pivetta
ff986a9bf5 #1169 DDC-3343 - importing used classe 2015-01-24 11:54:58 +01:00
Marco Pivetta
ed0331d25a #1169 DDC-3343 - optimized imports 2015-01-24 11:54:32 +01:00
Marco Pivetta
43f301fdad #1169 DDC-3343 - refactoring test to use pre-existing test models 2015-01-24 11:54:17 +01:00
Marco Pivetta
15397bbe40 #1169 DDC-3343 - refactoring test to use pre-existing test models 2015-01-24 11:54:03 +01:00
Marco Pivetta
aed01ea571 #1169 DDC-3343 - minor refactoring: constant over string reference 2015-01-24 11:41:20 +01:00
Andrea Sprega
c2b3348f99 [DDC-3343] Failing test case (updated) 2015-01-24 11:30:17 +01:00
Andrea Sprega
db3697433b [DDC-3343] Failing test case 2015-01-24 11:30:17 +01:00
Marco Pivetta
8305649a45 #1176 DDC-3378 - refactored test logic to use the newly introduced test assets 2015-01-22 12:10:39 +01:00
Marco Pivetta
8987c9ab37 #1176 DDC-3378 - moved test asset entities to proper models directory 2015-01-22 12:07:42 +01:00
Adrien Brault
f189c1aaf0 Update test to valid use case 2015-01-22 11:18:12 +01:00
Adrien Brault
4058ad3958 Add test exposing UnitOfWork merge bug 2015-01-22 11:18:12 +01:00
Marco Pivetta
6547d5462e #1257 DDC-3300 - strengthening test case (missing assertion, test name) 2015-01-22 09:51:43 +01:00
Marco Pivetta
c1cc768aee #1257 DDC-3300 - correcting further incomplete discriminator maps in the test suite 2015-01-22 09:50:59 +01:00
Marco Pivetta
635d2c141f #1130 DDC-3300 - minor CS fix (EOF EOL) 2015-01-22 09:44:39 +01:00
Marco Pivetta
fbe294927f #1130 DDC-3300 - cleaning up test code 2015-01-22 09:44:39 +01:00
Marco Pivetta
8a6b1b48e3 #1130 DDC-3300 - removing unused ResolveDiscriminatorMapListener and related test 2015-01-22 09:44:39 +01:00
Marco Pivetta
b7c28924b1 #1130 DDC-3300 - fixed inheritance maps where inheritance members were missing 2015-01-22 09:44:39 +01:00
mmoreram
5a1a32297b Tested DDC-3300 2015-01-22 09:44:38 +01:00
Marco Pivetta
9abbdb9e7f #1265 DDC-3517 - moved test assets to separate models dir, namespaced table names 2015-01-18 18:25:46 +01:00
Marco Pivetta
185f22668c #1265 DDC-3517 - correcting test docblocks 2015-01-18 18:15:03 +01:00
Marco Pivetta
bffc99a116 #1265 DDC-3517 - failing test - finding via a STI root class fails if there is a one-to-one association in a subclass 2015-01-18 18:13:15 +01:00
Marco Pivetta
61e07e5907 Handling minor HHVM incompatibility (dumped value is different between PHP and HHVM) 2015-01-18 02:54:18 +01:00
Marco Pivetta
7cba76082e Corrected test: metadata should be retrieved from a specific entity manager
Metadata is subject to modification depending on the active database platform (generator strategies, usually),
therefore it is not safe to pull it from an entity manager and sharing metadata across multiple entity managers.
2015-01-18 02:32:02 +01:00
Marco Pivetta
1cd03625a5 #1228 DDC-3490 - fixed exception catching in BasicFunctionalTest logic 2015-01-18 00:59:58 +01:00
Marco Pivetta
66479334d4 #1228 DDC-3490 - computing changes of invalid objects should also fail 2015-01-18 00:55:40 +01:00
Marco Pivetta
9c1275bb1f #1228 DDC-3490 - persistence of invalid values should also cause exceptions 2015-01-18 00:54:18 +01:00
Marco Pivetta
5e76f12000 #1228 DDC-3490 - tests for invalid association values handled in the UnitOfWork 2015-01-18 00:37:21 +01:00
Marco Pivetta
369a9934a5 #1252 DDC-3496 - moving stub naming strategy to tests directory 2015-01-18 00:07:54 +01:00
Marco Pivetta
29007e7d79 #1252 DDC-3496 - minor test cleanups (avoiding private static method) 2015-01-18 00:03:49 +01:00
Jack Sleight
04d8f66b72 Tests for new class based join column NamingStrategy 2015-01-17 23:57:52 +01:00
Marco Pivetta
95fe03b182 #954 DDC-2982 - Coverage for different instantiation of single-/multi-get cache regions 2015-01-17 23:42:15 +01:00
Marco Pivetta
0e4a7caf0b #954 DDC-2982 - Evicting all cache entries is not supported with a generic cache adapter 2015-01-17 23:30:20 +01:00
Marco Pivetta
3c5a794691 #954 DDC-2982 - Making cache Region always a MultiGetRegion (no need to segregate the interface here) 2015-01-17 23:10:49 +01:00
Asmir Mustafic
3f64f3252b Changed some tests to be compatible with the new implementation of
multiget region
2015-01-17 22:27:59 +01:00
Asmir Mustafic
e73bd9e9bb New buildCacheEntry way bo build a entry for a cached collection 2015-01-17 22:27:59 +01:00
Asmir Mustafic
1b4eee6d0d Fixed strange test case with CmsUser and second-level cache 2015-01-17 22:27:59 +01:00
Asmir Mustafic
77c2e24215 Added test case for buildCachedCollectioHydrator on DefaultCacheFactory 2015-01-17 22:27:59 +01:00
Asmir Mustafic
b0792330e4 Added test case for MultiGetRegion 2015-01-17 22:27:58 +01:00
Bill Schaller
39aeb9935b Added failing testcase for Limit queries on entities with column names containing 'asc' or desc' 2015-01-17 22:12:26 +01:00
Bill Schaller
7031539314 Fixed SQL that could be considered invalid on the targeted platforms in LimitSubqueryOutputWalkerTest 2015-01-17 22:12:26 +01:00
Bill Schaller
42bea80a6a Added failing test cases for limit queries with with complex scalar order by items 2015-01-17 22:12:25 +01:00
Bill Schaller
a4ebc08c4f * Modified tests in LimitSubqueryOutputWalkerTest.php to not have duplicated order by clauses
* Modified LimitSubqueryOutputWalker to not duplicate order by clauses
2015-01-17 22:12:25 +01:00
Marco Pivetta
f06d652393 #1262 DDC-3513 - RunDqlCommand should display the generated SQL when asked to do so 2015-01-17 21:30:34 +01:00
Marco Pivetta
1c6fd512a5 #1262 DDC-3513 - providing basic coverage for the RunDqlCommand logic 2015-01-17 21:27:32 +01:00
Kiel Goodman
dc98da585d [DDC-3436] Fix changes requested 1/2 2015-01-17 08:33:23 +01:00
Kiel Goodman
349966832f [DDC-3436] Convert short array syntax to legacy style 2015-01-17 08:33:23 +01:00
Kiel Goodman
918d2910d9 [DDC-3108] Fix regression introduced in DDC-2764 where join aliases were no longer accessible in Criteria expressions 2015-01-17 08:33:23 +01:00
Marco Pivetta
e9fd5678a5 #1206 DDC-3430 - PersistentCollection should not mutate the given Criteria instances when matching() 2015-01-17 08:30:16 +01:00
Marco Pivetta
40849f8ae1 #1086 - Minor CS fixes applied to the test case (simplifying) 2015-01-17 08:09:55 +01:00
Thomas Lallement
a0165858c4 Delete DDC0003Test.php 2015-01-17 08:09:55 +01:00
Thomas Lallement
033b8e51e9 Create DDC3223Test.php 2015-01-17 08:09:55 +01:00
Thomas Lallement
556c562258 Failing test (get id return string type) 2015-01-17 08:09:54 +01:00
Marco Pivetta
67f59dc256 Revert "#1178 - simplified ValueConversionType tests by using a single model-set for the entire subset of tests (faster as well)"
This reverts commit 2702540930.
2015-01-17 08:01:31 +01:00
Marco Pivetta
2702540930 #1178 - simplified ValueConversionType tests by using a single model-set for the entire subset of tests (faster as well) 2015-01-17 07:59:03 +01:00
Marco Pivetta
edf054cd0c #1178 - removing duplicate configuration of the rot13 DBAL type 2015-01-17 07:59:03 +01:00
Marco Pivetta
b32c779c37 #1178 - minor typo (method names) 2015-01-17 07:59:02 +01:00
Marco Pivetta
e5c4e65764 #1178 - proxy identifiers should be correctly converted 2015-01-17 07:59:02 +01:00
Marco Pivetta
445798ed46 #1178 - reverting patch and keeping tests (rebase gone awry)
Also cleaning up `OrmFunctionalTestCase`
2015-01-17 07:59:00 +01:00
Jasper N. Brouwer
7b9c6a69bd Add tests for extra lazy many-to-many associations
and fixed production code
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
ba3df8577b Refined and added tests, fixed found issues
- Renamed id properties so they don't coexist between entities in a test
- Added tests for extra lazy one-to-many associations
- Fixed production code to make tests green
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
f60f2a567a Fixed associations using a value-conversion type for identifiers 2015-01-17 07:58:59 +01:00
Marco Pivetta
f6445d5a3e Fixing build using a dedicated in-memory connection to stub out two real connections for DB-access checks 2015-01-17 07:58:35 +01:00
Marco Pivetta
42c9ff026e #1172 - renaming test class for clarity 2015-01-16 22:47:00 +01:00
Marco Pivetta
937113e234 #1172 - simplified logic, re-using existing generic model 2015-01-16 22:46:31 +01:00
Marco Pivetta
cd3fc6e6ea #1172 - adding required @group annotations for newly introduced tests 2015-01-16 22:43:52 +01:00
Marco Pivetta
94724b7a56 #1172 - reverted: moving MergeUninitializedProxyTest tests into EntityManagerTest (invalid, as they are functional tests) 2015-01-16 22:43:03 +01:00
Marco Pivetta
3769cd1119 #1172 - adding required @group annotations for newly introduced tests 2015-01-16 22:37:38 +01:00
Marco Pivetta
70840131ff #1172 - moved MergeUninitializedProxyTest tests into EntityManagerTest 2015-01-16 22:36:30 +01:00
Marco Pivetta
438feccd55 #1172 - removing redundant test logic 2015-01-16 22:25:41 +01:00
Marco Pivetta
de4e980389 #1172 - covering merging of unmanaged, un-initialized proxies bound to a different entity manager 2015-01-16 22:25:00 +01:00
Marco Pivetta
b7566dc65b #1172 - correcting test: all connections should have a saved file instance 2015-01-16 22:20:58 +01:00
Marco Pivetta
d1e7960f99 #1172 - tests to verify that proxies keep distinct entity manager instances even across merging operations 2015-01-16 22:12:42 +01:00
Marco Pivetta
4ed0a6ce53 #1172 - removing redundant tests 2015-01-16 21:25:25 +01:00
Marco Pivetta
3df119f4fe #1172 - when merging an initialized proxy, the managed proxy must be initialized before merging 2015-01-16 21:23:47 +01:00
Marco Pivetta
a18f258b4d #1172 - covering merging of managed proxies 2015-01-16 21:15:39 +01:00
Marco Pivetta
0329ac5074 #1172 - covering also detached proxies - merging operations should not initialize either proxy 2015-01-16 21:14:13 +01:00
Marco Pivetta
dde09872df #1172 - writing a more concise test case about merging detached proxies 2015-01-16 21:09:53 +01:00
Mathieu De Zutter
318b23097b Don't load uninitialized proxies after merging.
Previous patch avoided initialization of proxies before merging, mainly to
fix a bug with merging. However, later on, doctrine tries again to load
the proxy. This is unnecessary and thus has been removed. This way, a
round trip to the database is saved.
2015-01-16 20:54:15 +01:00
Mathieu De Zutter
ec35d4886c Don't load detached proxies when merging them.
Ticket DDC-1392 fixed an issue where uninitialized proxies could not be merged
because the merge routine couldn't get the identifier from them. The soution
was to initialize the proxy.
Ticket DDC-1734 fixed the merging of *unserialized* uninitialized proxies by
resetting their internals, so these proxies were able to initialize, as required
by the fix for DDC-1392.

Somehow, in the meanwhile, the fix for DDC-1392 is not needed anymore:
reverting the patch will not break the associated test (but it does break the
test for DDC-1734). This means it is not needed anymore to initialize the proxy
when merging.

Uninitialized proxies that get merged should not be loaded at all.  Since they
are not initialized, the entity data for sure hasn't changed, so it can be
safely ignored. Actually, the only thing the data is needed for while merging,
is to copy it into the managed entity, but that one is already supposed to be
up to date. By not initializing the proxy, a potential database roundtrip is
saved, and the fix for DDC-1734 is not needed anymore.

Besides optimizing the merge, this patch also solves an issue with merging.
Currently, when a detached uninitialized proxy is merged while there is already a
corresponding managed entity (proxy or not), the ORM returns a blank entity
instead of returning the already managed entity. This patch makes sure that
already existing managed entities are re-used.
2015-01-16 20:54:15 +01:00
Marco Pivetta
7e4dab17ec #1133 DDC-3305 - test case with embeddable without referenced embeddable class 2015-01-16 19:45:16 +01:00
Marco Pivetta
f799986be1 Reverting BC break in AbstractIdGenerator signature 2015-01-16 18:52:58 +01:00
Marco Pivetta
dd8db1acd2 DDC-3427 - s/EntityManager/EntityManagerInterface in relevant tests about identifier generation 2015-01-16 14:22:03 +01:00
Guilherme Blanco
f90475772d Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
Marco Pivetta
6564f95260 Typo fix (region should be named 'bar', not 'foo' 2015-01-15 21:17:25 +01:00
Marco Pivetta
a82eecfc07 Each cache region built by the DefaultCacheFactory should have its own cache with its own unique namespace 2015-01-15 21:15:38 +01:00
Marco Pivetta
f38d4551f1 Cache regions should not modify the injected cache instance settings 2015-01-15 21:01:02 +01:00
Guilherme Blanco
0b2fb7fd78 Fixed identifier quoting in functional tests. 2015-01-15 03:55:29 +00:00
Guilherme Blanco
8a0989aa50 Fixed identifier quoting in functional tests. 2015-01-15 03:50:18 +00:00
Marco Pivetta
5bd921139e Merge branch 'hotfix/#1250-DDC-3493-fix-class-pseudo-constant-parsing-in-entitygenerator' 2015-01-15 04:16:44 +01:00
Guilherme Blanco
a1d77bdc65 Renamed coll to collection and some small updates to tests. 2015-01-15 03:14:48 +00:00
lukasmaz
41dd584f62 Test case for "class" keyword
Test case for http://www.doctrine-project.org/jira/browse/DDC-3493
2015-01-15 04:12:31 +01:00
Marco Pivetta
55a75bfb1b Merge pull request #1249 from doctrine/extra-lazy-get-m2m
Support for extra lazy get for both owning and inverse side on many to many associations.
2015-01-15 03:36:35 +01:00
Steve Müller
d343617f13 Merge pull request #1255 from Ocramius/cleanup/php-5.3-support-end
Cleanup: PHP 5.3 support end
2015-01-15 01:29:00 +01:00
Marco Pivetta
8b223c5c83 #1072 DDC-3191 - test cleanup: reflection is better than mixing up I/O operations and global state 2015-01-15 00:54:25 +01:00
Marco Pivetta
aca719be41 #1072 DDC-3191 - adding test for failing glob() operations on the FileLockRegion 2015-01-15 00:36:26 +01:00
Alexander Kurilo
58cd520e32 Fix attempt of traversing bool in FileLockRegion 2015-01-14 23:51:41 +01:00
Marco Pivetta
9024c04c72 Removing conditionals checking for PHP 5.4 support 2015-01-14 20:14:39 +01:00
Marco Pivetta
0106cba602 #881 DDC-2825 - reusing mapping files that already exist in models, where applicable 2015-01-14 19:17:39 +01:00
Marco Pivetta
7164e28138 #881 DDC-2825 - renaming table/schema name for clarity and to avoid collisions 2015-01-14 19:16:42 +01:00
Marco Pivetta
7b168de236 #881 DDC-2825 - removing unused imports 2015-01-14 19:05:40 +01:00
Marco Pivetta
962f479318 #881 DDC-2825 - refactoring test logic, removing dead private method 2015-01-14 19:04:58 +01:00
Marco Pivetta
80ce601eae #881 DDC-2825 - refactoring test logic to use data-provider instead of code repetitions 2015-01-14 19:02:44 +01:00
Marco Pivetta
f874189456 #881 DDC-2825 - refactoring tests for clarity/readability and ease of use 2015-01-14 18:56:37 +01:00
Marco Pivetta
9d6890e6ca #881 DDC-2825 - expectations are the first parameter in an assertion 2015-01-14 18:50:17 +01:00
Marco Pivetta
67788d89b5 #881 DDC-2825 - simplifying/extracting test logic: moved verifying metadata into separate test method 2015-01-14 18:47:17 +01:00
Marco Pivetta
0a91b83e27 #881 DDC-2825 - exploding test case into smaller units 2015-01-14 18:34:58 +01:00
Marco Pivetta
6f85ca3356 #881 DDC-2825 - exploding test case into smaller units 2015-01-14 18:31:11 +01:00
Marco Pivetta
04467218a3 #881 DDC-2825 - providing YAML mappings for explicit schema definition 2015-01-14 18:05:58 +01:00
Marco Pivetta
7911beaf1c #881 DDC-2825 - providing YAML mappings for implicit schema definition 2015-01-14 18:05:38 +01:00
Marco Pivetta
0fd51cf852 #881 DDC-2825 - providing PHP mappings for implicit schema definition 2015-01-14 17:53:01 +01:00
Marco Pivetta
d96cd1b690 #881 DDC-2825 - providing PHP mappings for explicit schema definition 2015-01-14 17:52:51 +01:00
Marco Pivetta
53845b79e1 #881 DDC-2825 - providing XML mappings for implicit schema definition 2015-01-14 17:34:44 +01:00
Marco Pivetta
941bfca68c #881 DDC-2825 - providing XML mappings for explicit schema definition 2015-01-14 17:27:53 +01:00
Marco Pivetta
617fd6cfdc #881 DDC-2825 - moving YAML and XML mapping tests to base mapping driver tests. Excluding Static PHP mapping tests 2015-01-14 16:59:01 +01:00
Marco Pivetta
cf641cd0a3 #881 DDC-2825 - testing annotation driver with table name defining schema name as part of the name 2015-01-14 16:47:05 +01:00
Marco Pivetta
8b2b54c033 #881 DDC-2825 - typo fix (causing test failure) 2015-01-14 16:32:02 +01:00