@@ -2,15 +2,13 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\Company\CompanyPerson, |
|
6 | - Doctrine\Tests\Models\Company\CompanyEmployee, |
|
7 | - Doctrine\Tests\Models\Company\CompanyManager, |
|
8 | - Doctrine\Tests\Models\Company\CompanyOrganization, |
|
9 | - Doctrine\Tests\Models\Company\CompanyEvent, |
|
10 | - Doctrine\Tests\Models\Company\CompanyAuction, |
|
11 | - Doctrine\Tests\Models\Company\CompanyRaffle, |
|
12 | - Doctrine\Tests\Models\Company\CompanyCar; |
|
13 | - |
|
5 | +use Doctrine\Tests\Models\Company\CompanyPerson; |
|
6 | +use Doctrine\Tests\Models\Company\CompanyEmployee; |
|
7 | +use Doctrine\Tests\Models\Company\CompanyManager; |
|
8 | +use Doctrine\Tests\Models\Company\CompanyOrganization; |
|
9 | +use Doctrine\Tests\Models\Company\CompanyEvent; |
|
10 | +use Doctrine\Tests\Models\Company\CompanyAuction; |
|
11 | +use Doctrine\Tests\Models\Company\CompanyRaffle; |
|
14 | 12 | use Doctrine\Common\Collections\Criteria; |
15 | 13 | |
16 | 14 | /** |
@@ -27,7 +27,7 @@ |
||
27 | 27 | } |
28 | 28 | |
29 | 29 | /** |
30 | - * @param string $className |
|
30 | + * @param string $classNames |
|
31 | 31 | * @return ClassMetadata |
32 | 32 | */ |
33 | 33 | protected function extractClassMetadata(array $classNames) |
@@ -133,6 +133,12 @@ discard block |
||
133 | 133 | return array($user1, $user2, $user3); |
134 | 134 | } |
135 | 135 | |
136 | + /** |
|
137 | + * @param string $name |
|
138 | + * @param string $username |
|
139 | + * @param string $status |
|
140 | + * @param CmsAddress $address |
|
141 | + */ |
|
136 | 142 | public function buildUser($name, $username, $status, $address) |
137 | 143 | { |
138 | 144 | $user = new CmsUser(); |
@@ -147,6 +153,12 @@ discard block |
||
147 | 153 | return $user; |
148 | 154 | } |
149 | 155 | |
156 | + /** |
|
157 | + * @param string $country |
|
158 | + * @param string $city |
|
159 | + * @param string $street |
|
160 | + * @param string $zip |
|
161 | + */ |
|
150 | 162 | public function buildAddress($country, $city, $street, $zip) |
151 | 163 | { |
152 | 164 | $address = new CmsAddress(); |
@@ -4,7 +4,6 @@ |
||
4 | 4 | |
5 | 5 | use Doctrine\Common\Collections\ArrayCollection; |
6 | 6 | use Doctrine\Tests\Models\CMS\CmsUser; |
7 | -use Doctrine\Tests\Models\CMS\CmsPhonenumber; |
|
8 | 7 | use Doctrine\Tests\Models\CMS\CmsGroup; |
9 | 8 | |
10 | 9 | class DDC758Test extends \Doctrine\Tests\OrmFunctionalTestCase |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsUser, |
|
6 | - Doctrine\Tests\Models\CMS\CmsAddress, |
|
7 | - Doctrine\Tests\Models\CMS\CmsPhonenumber, |
|
8 | - Doctrine\ORM\Query; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsAddress; |
|
7 | +use Doctrine\Tests\Models\CMS\CmsPhonenumber; |
|
8 | +use Doctrine\ORM\Query; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * IdentityMapTest |
@@ -375,8 +375,16 @@ |
||
375 | 375 | private $name; |
376 | 376 | public function getId() {return $this->id;} |
377 | 377 | public function getValue() {return $this->value;} |
378 | + |
|
379 | + /** |
|
380 | + * @param string $value |
|
381 | + */ |
|
378 | 382 | public function setValue($value) {$this->value = $value;} |
379 | 383 | public function getName() {return $this->name;} |
384 | + |
|
385 | + /** |
|
386 | + * @param string $name |
|
387 | + */ |
|
380 | 388 | public function setName($name) {$this->name = $name;} |
381 | 389 | /** @PreUpdate */ |
382 | 390 | public function testCallback() {$this->value = 'Hello World';} |
@@ -139,6 +139,9 @@ discard block |
||
139 | 139 | ); |
140 | 140 | } |
141 | 141 | |
142 | + /** |
|
143 | + * @param string $entityName |
|
144 | + */ |
|
142 | 145 | protected function asyncFindWithLock($entityName, $entityId, $lockMode) |
143 | 146 | { |
144 | 147 | $this->startJob('findWithLock', array( |
@@ -148,6 +151,9 @@ discard block |
||
148 | 151 | )); |
149 | 152 | } |
150 | 153 | |
154 | + /** |
|
155 | + * @param string $dql |
|
156 | + */ |
|
151 | 157 | protected function asyncDqlWithLock($dql, $params, $lockMode) |
152 | 158 | { |
153 | 159 | $this->startJob('dqlWithLock', array( |
@@ -157,6 +163,9 @@ discard block |
||
157 | 163 | )); |
158 | 164 | } |
159 | 165 | |
166 | + /** |
|
167 | + * @param string $entityName |
|
168 | + */ |
|
160 | 169 | protected function asyncLock($entityName, $entityId, $lockMode) |
161 | 170 | { |
162 | 171 | $this->startJob('lock', array( |
@@ -166,6 +175,9 @@ discard block |
||
166 | 175 | )); |
167 | 176 | } |
168 | 177 | |
178 | + /** |
|
179 | + * @param string $fn |
|
180 | + */ |
|
169 | 181 | protected function startJob($fn, $fixture) |
170 | 182 | { |
171 | 183 | $this->gearman->addTask($fn, serialize(array( |
@@ -2,10 +2,8 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsArticle, |
|
6 | - Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\DBAL\LockMode, |
|
8 | - Doctrine\ORM\EntityManager; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsArticle; |
|
6 | +use Doctrine\DBAL\LockMode; |
|
9 | 7 | |
10 | 8 | /** |
11 | 9 | * @group locking_functional |
@@ -2,10 +2,9 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\Tests\Models\CMS\CmsArticle, |
|
6 | - Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\DBAL\LockMode, |
|
8 | - Doctrine\ORM\EntityManager; |
|
5 | +use Doctrine\Tests\Models\CMS\CmsArticle; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
7 | +use Doctrine\DBAL\LockMode; |
|
9 | 8 | |
10 | 9 | /** |
11 | 10 | * @group locking |
@@ -2,11 +2,7 @@ |
||
2 | 2 | |
3 | 3 | namespace Doctrine\Tests\ORM\Functional\Locking; |
4 | 4 | |
5 | -use Doctrine\ORM\Mapping\ClassMetadata; |
|
6 | 5 | use Doctrine\ORM\OptimisticLockException; |
7 | -use Doctrine\Common\EventManager; |
|
8 | -use Doctrine\ORM\Mapping\ClassMetadataFactory; |
|
9 | -use Doctrine\Tests\TestUtil; |
|
10 | 6 | use Doctrine\DBAL\LockMode; |
11 | 7 | use DateTime; |
12 | 8 |
@@ -3,9 +3,9 @@ |
||
3 | 3 | namespace Doctrine\Tests\ORM\Functional; |
4 | 4 | |
5 | 5 | use Doctrine\Common\Collections\Criteria; |
6 | -use Doctrine\Tests\Models\CMS\CmsUser, |
|
7 | - Doctrine\Tests\Models\CMS\CmsGroup, |
|
8 | - Doctrine\Common\Collections\ArrayCollection; |
|
6 | +use Doctrine\Tests\Models\CMS\CmsUser; |
|
7 | +use Doctrine\Tests\Models\CMS\CmsGroup; |
|
8 | +use Doctrine\Common\Collections\ArrayCollection; |
|
9 | 9 | |
10 | 10 | /** |
11 | 11 | * Basic many-to-many association tests. |