Skip to content

Commit

Permalink
Fix wrong test class names and CS
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Mar 11, 2023
1 parent b3b3dcc commit fc6f2ab
Showing 1 changed file with 44 additions and 23 deletions.
67 changes: 44 additions & 23 deletions tests/Doctrine/Tests/ORM/Functional/Ticket/GH7180Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace Doctrine\Tests\Functional\Ticket;
namespace Doctrine\Tests\ORM\Functional\Ticket;

use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
Expand All @@ -25,14 +25,14 @@ protected function setUp(): void
{
parent::setUp();

$this->setUpEntitySchema([DDC7180A::class, DDC7180B::class, DDC7180C::class, DDC7180D::class, DDC7180E::class, DDC7180F::class, DDC7180G::class]);
$this->setUpEntitySchema([GH7180A::class, GH7180B::class, GH7180C::class, GH7180D::class, GH7180E::class, GH7180F::class, GH7180G::class]);
}

public function testIssue(): void
{
$a = new DDC7180A();
$b = new DDC7180B();
$c = new DDC7180C();
$a = new GH7180A();
$b = new GH7180B();
$c = new GH7180C();

$a->b = $b;
$b->a = $a;
Expand All @@ -51,10 +51,10 @@ public function testIssue(): void

public function testIssue3NodeCycle(): void
{
$d = new DDC7180D();
$e = new DDC7180E();
$f = new DDC7180F();
$g = new DDC7180G();
$d = new GH7180D();
$e = new GH7180E();
$f = new GH7180F();
$g = new GH7180G();

$d->e = $e;
$e->f = $f;
Expand All @@ -78,119 +78,140 @@ public function testIssue3NodeCycle(): void
/**
* @Entity
*/
class DDC7180A
class GH7180A
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @OneToOne(targetEntity=DDC7180B::class, inversedBy="a")
* @OneToOne(targetEntity=GH7180B::class, inversedBy="a")
* @JoinColumn(nullable=false)
* @var GH7180B
*/
public $b;
}

/**
* @Entity
*/
class DDC7180B
class GH7180B
{
/**
* @GeneratedValue()
* @Id
* @Column(type="integer")
* @var int
*/
public $id;

/**
* @OneToOne(targetEntity=DDC7180A::class, mappedBy="b")
* @OneToOne(targetEntity=GH7180A::class, mappedBy="b")
* @JoinColumn(nullable=true)
* @var GH7180A
*/
public $a;
}

/**
* @Entity
*/
class DDC7180C
class GH7180C
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @ManyToOne(targetEntity=DDC7180A::class)
* @ManyToOne(targetEntity=GH7180A::class)
* @JoinColumn(nullable=false)
* @var GH7180A
*/
public $a;
}

/**
* @Entity
*/
class DDC7180D
class GH7180D
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @OneToOne(targetEntity=DDC7180E::class)
* @OneToOne(targetEntity=GH7180E::class)
* @JoinColumn(nullable=false)
* @var GH7180E
*/
public $e;
}

/**
* @Entity
*/
class DDC7180E
class GH7180E
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @OneToOne(targetEntity=DDC7180F::class)
* @OneToOne(targetEntity=GH7180F::class)
* @JoinColumn(nullable=false)
* @var GH7180F
*/
public $f;
}

/**
* @Entity
*/
class DDC7180F
class GH7180F
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @ManyToOne(targetEntity=DDC7180D::class)
* @ManyToOne(targetEntity=GH7180D::class)
* @JoinColumn(nullable=true)
* @var GH7180D
*/
public $d;
}

/**
* @Entity
*/
class DDC7180G
class GH7180G
{
/**
* @GeneratedValue()
* @Id @Column(type="integer")
* @var int
*/
public $id;

/**
* @ManyToOne(targetEntity=DDC7180D::class)
* @ManyToOne(targetEntity=GH7180D::class)
* @JoinColumn(nullable=false)
* @var GH7180D
*/
public $d;
}

0 comments on commit fc6f2ab

Please sign in to comment.