Alessandro Lai
4eb4465169
Fix as per review
2017-04-18 11:57:49 +02:00
Sergio Santoro
e798bfe34a
[QUERY] "INSTANCE OF" now behaves correctly with subclasses
...
There was a bug in the "INSTANCE OF" operator as described in
https://groups.google.com/forum/#!topic/doctrine-user/B8raq8CNMgg
"INSTANCE OF" was not taking into account subclasses.
It was merely translating the class to its discriminator.
This is not correct since the class can have subtypes and those
are, indeed, still instance of the superclass.
Also, classes may not have a discriminator (e.g. abstract classes).
This commit also provides useful tests to avoid regression.
2017-04-11 17:50:01 +02:00
Sam-Burns
3d7a7346f7
Quieting risky test warnings where tests do actually perform assertions
2017-03-31 23:23:22 +01:00
Sam-Burns
5bd7bd8d48
Updating to PHPUnit 6
2017-03-31 21:59:02 +01:00
Boris Yonchev
bd1efaf528
DDC-2780 - Fixed issue with IS NULL on join aliases
2017-03-07 18:34:50 +01:00
Luís Cobucci
dcc80af7d9
Fix EntityManagerDecorator tests
...
We were expecting a return value for all methods but on 6a56df9a24
we changed some methods to be void and of course that affected the
ORM.
2017-02-12 18:38:21 +01:00
Matteo Beccati
c816d375e8
Add missing group to DDC2660Test.php
...
With the current PHPUnit version and PHP 7.2/master, the test fails with:
1) Doctrine\Tests\ORM\Functional\Ticket\DDC2660Test::testIssueWithExtraColumn
array_flip(): Can only flip STRING and INTEGER values!
2) Doctrine\Tests\ORM\Functional\Ticket\DDC2660Test::testIssueWithoutExtraColumn
array_flip(): Can only flip STRING and INTEGER values!
Due to the group being NULL vs "" on older PHP versions.
I will also file a bug report or fix to PHPUnit and/or PHP itself, but it sounds
like the missing group was just a typo.
2017-01-24 12:46:19 +01:00
Luís Cobucci
1f53afa9cd
Make sure we're using the rootEntityName on all places
...
Otherwise we might end up with duplicated cache entries and weird
results (specially regarding associations).
2017-01-19 17:24:47 +01:00
Mikhail Polyanin
bb943afabe
Optimization. Multiple get in QueryCache
2017-01-16 23:02:23 +01:00
Marco Pivetta
730db5fd2e
Merge pull request #6232 from gadelkareem/patch-3
...
Allow gearman env vars
2017-01-14 01:18:13 +01:00
Waleed Gadelkareem
109ac5f827
Allow gearman env vars
2017-01-13 18:11:10 +01:00
Waleed Gadelkareem
d137ffe0a4
Allow gearman environment vars
2017-01-13 18:09:36 +01:00
Luís Cobucci
eaedc37d7b
Fix alignment issues on DefaultCacheFactoryTest.php
2017-01-11 11:04:43 +01:00
Luís Cobucci
5a562b3571
Appends cache namespace when it exists (for L2C regions)
...
We're overriding the namespace without even checking if it was previously
set, what causes problems when people uses that feature 😉
2017-01-11 11:01:39 +01:00
Marco Pivetta
21a5d8ca1b
#6174 #5570 removed modifications applied to the CompanyContractListener
, since UnitOfWorkTest
now completely encapsulates the scenarios being covered
2016-12-18 15:48:10 +01:00
Marco Pivetta
cfd595b699
#6174 #5570 removed unused imports
2016-12-18 15:46:49 +01:00
Marco Pivetta
018a5db08f
#6174 #5570 renamed entity for better fitting the use-cases it's in
2016-12-18 15:46:34 +01:00
Marco Pivetta
f39f1a2e11
#6174 #5570 removed unused test class
2016-12-18 15:45:03 +01:00
Marco Pivetta
262d13a047
#6174 #5570 adding group annotations to newly introduced test
2016-12-18 15:44:48 +01:00
Marco Pivetta
f4595d3a2f
#6174 #5570 prePersist
listeners should never be called when entities are merged, but are already in the UoW
2016-12-18 15:43:29 +01:00
Marco Pivetta
30cd2d172b
#6174 #5570 started moving tests around prePersist
event subscriber triggering on UnitOfWork
into the UnitOfWorkTest
2016-12-18 15:37:49 +01:00
Marco Pivetta
9582ffc982
#6174 #5570 CS fixes around the EntityListenersOnMergeTest
2016-12-18 14:53:54 +01:00
Marco Pivetta
00c67ba2db
#6174 #5570 adding group annotation to newly introduced tests
2016-12-18 14:47:55 +01:00
Marco Pivetta
0c2edcd08a
#6174 #5570 CS - spacing/variable naming
2016-12-18 14:47:16 +01:00
bilouwan
1be226cf63
Rename test
2016-12-15 15:12:29 +01:00
bilouwan
7f4de25a26
Cherry pick unit test from PR #5570 (Fix PrePersist EventListener when using merge instead of persist)
2016-12-15 13:03:53 +01:00
bilouwan
d1c8d378cf
Create failing test to reveal the issue
2016-12-15 12:47:45 +01:00
Luís Cobucci
ba9fecc43f
Remove commented code that seems to not be important
2016-12-08 18:16:11 +01:00
Luís Cobucci
62d122bd54
Remove old "CLASSNAME" constants from test models
2016-12-08 18:15:48 +01:00
Luís Cobucci
fda6fdd9fb
Use "::class" syntax on "tests" directory
2016-12-08 18:13:39 +01:00
Luís Cobucci
74c8a08828
Use short-array syntax on "tests" directory
2016-12-07 23:33:41 +01:00
Marco Pivetta
dc3b166811
#6017 replaced random_int()
with rand()
, since we still support oldstable PHP (5.6.x)
2016-11-27 18:38:57 +01:00
Marco Pivetta
44a6141235
#6017 removed clear($entityName)
tests from UnitOfWorkTest
: now covered in EntityManagerTest
2016-11-27 18:37:45 +01:00
Marco Pivetta
92274124f9
#6017 moving tests around clear()
into the EntityManager
tests
...
`UnitOfWork` assumptions are OK, since we don't want to clutter the API even more down there
2016-11-27 18:37:45 +01:00
Marco Pivetta
49333867f8
FQCN reference correction
2016-11-27 18:36:49 +01:00
Marco Pivetta
9894dcb4b0
#6017 clear($proxyClassName)
should behave like clear($realClassName)
2016-11-27 18:36:49 +01:00
Marco Pivetta
fdb2af07e7
#6017 hardened clear()
logic, which now ensures that persisted entries are correctly cleared
2016-11-27 18:36:49 +01:00
Marco Pivetta
c1038096e0
#6017 requesting clear('nonExistingEntityName')
should raise a MappingException
2016-11-27 18:36:48 +01:00
Marco Pivetta
c97799f151
#6017 expecting an ORMInvalidArgumentException
when clearing with invalid data
2016-11-27 18:36:48 +01:00
Marco Pivetta
56598596a4
#6017 adding @group
annotation to newly introduced tests
2016-11-27 18:36:48 +01:00
Marco Pivetta
6ad9c9ea04
#6017 test coverage for ORMInvalidArgumentException::invalidEntityName
2016-11-27 18:36:48 +01:00
Jeremy Benoist
6b1d64d484
Remove unecessary persist in tests
2016-11-27 18:36:48 +01:00
Jeremy Benoist
be4aafd4f6
Use ORMException instead of a default exception
2016-11-27 18:36:48 +01:00
Jeremy Benoist
2a7d21ad18
Throw an exception instead of a workaround
2016-11-27 18:36:48 +01:00
Jeremy Benoist
4a87f00fab
Avoid error when entityName isn't a string
2016-11-27 18:36:48 +01:00
Marco Pivetta
cff5c07014
#5935 #5684 #6020 #6152 removed useless NAME
constant from the test
2016-11-27 17:49:09 +01:00
Marco Pivetta
73ea0ba8f3
#5935 #5684 #6020 #6152 adding description to the test scenario
2016-11-27 17:45:50 +01:00
Christian Hammerl
0a86c324ad
Add test case for autoincremented id of custom type
2016-11-27 01:45:56 +01:00
Marco Pivetta
f8002ca27e
#6068 hardened test logic to verify that nothing is present after the |null
in @var
and @return
types
2016-11-26 06:35:23 +01:00
Javier Spagnoletti
ad6469b64a
Update tests
2016-11-26 06:12:31 +01:00