1
0
mirror of synced 2025-03-06 04:46:13 +03:00

#6284 removing profile entity, since it is not needed to reproduce the issue

This commit is contained in:
Marco Pivetta 2017-08-22 21:21:53 +02:00
parent ca39abcd71
commit dac1ce4172
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -14,7 +14,6 @@ final class GH6217Test extends OrmFunctionalTestCase
$this->_schemaTool->createSchema(
[
$this->_em->getClassMetadata(GH6217User::class),
$this->_em->getClassMetadata(GH6217Profile::class),
$this->_em->getClassMetadata(GH6217Category::class),
$this->_em->getClassMetadata(GH6217UserProfile::class),
]
@ -27,13 +26,11 @@ final class GH6217Test extends OrmFunctionalTestCase
public function testRetrievingCacheShouldNotThrowUndefinedIndexException()
{
$user = new GH6217User();
$profile = new GH6217Profile();
$category = new GH6217Category();
$userProfile = new GH6217UserProfile($user, $profile, $category);
$userProfile = new GH6217UserProfile($user, $category);
$this->_em->persist($category);
$this->_em->persist($user);
$this->_em->persist($profile);
$this->_em->persist($userProfile);
$this->_em->flush();
$this->_em->clear();
@ -63,18 +60,6 @@ class GH6217User
}
}
/** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */
class GH6217Profile
{
/** @Id @Column(type="string") @GeneratedValue(strategy="NONE") */
public $id;
public function __construct()
{
$this->id = uniqid(self::class, true);
}
}
/** @Entity @Cache(usage="NONSTRICT_READ_WRITE") */
class GH6217Category
{
@ -93,16 +78,12 @@ class GH6217UserProfile
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217User::class) */
public $user;
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Profile::class, fetch="EAGER") */
public $profile;
/** @Id @Cache("NONSTRICT_READ_WRITE") @ManyToOne(targetEntity=GH6217Category::class, fetch="EAGER") */
public $category;
public function __construct(GH6217User $user, GH6217Profile $profile, GH6217Category $category)
public function __construct(GH6217User $user, GH6217Category $category)
{
$this->user = $user;
$this->profile = $profile;
$this->category = $category;
}
}