Skip to content

Commit

Permalink
#6284 removing profile entity, since it is not needed to reproduce th…
Browse files Browse the repository at this point in the history
…e issue
  • Loading branch information
Ocramius committed Aug 22, 2017
1 parent ca39abc commit dac1ce4
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH6217Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ public function setUp()
$this->_schemaTool->createSchema(
[
$this->_em->getClassMetadata(GH6217User::class),
$this->_em->getClassMetadata(GH6217Profile::class),
$this->_em->getClassMetadata(GH6217Category::class),
$this->_em->getClassMetadata(GH6217UserProfile::class),
]
Expand All @@ -27,13 +26,11 @@ public function setUp()
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();
Expand Down Expand Up @@ -63,18 +60,6 @@ public function __construct()
}
}

/** @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
{
Expand All @@ -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;
}
}

0 comments on commit dac1ce4

Please sign in to comment.