Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04a271a

Browse files
committed
doctrine#1277 DDC-3346 DDC-3531 - refactoring test assets for readability
1 parent 36bc448 commit 04a271a

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

tests/Doctrine/Tests/Models/DDC3346/DDC3346Article.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,20 @@
88
*/
99
class DDC3346Article
1010
{
11-
const CLASSNAME = 'Doctrine\Tests\Models\DDC3346\DDC3346Article';
11+
const CLASSNAME = __CLASS__;
12+
1213
/**
1314
* @Id
1415
* @Column(type="integer")
1516
* @GeneratedValue(strategy="AUTO")
1617
*/
1718
public $id;
19+
1820
/**
21+
* @var DDC3346Author
22+
*
1923
* @ManyToOne(targetEntity="DDC3346Author", inversedBy="articles")
2024
* @JoinColumn(name="user_id", referencedColumnName="id")
2125
*/
2226
public $user;
23-
24-
public function setAuthor(DDC3346Author $author)
25-
{
26-
$this->user = $author;
27-
}
2827
}

tests/Doctrine/Tests/Models/DDC3346/DDC3346Author.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@
88
*/
99
class DDC3346Author
1010
{
11-
const CLASSNAME = 'Doctrine\Tests\Models\DDC3346\DDC3346Author';
11+
const CLASSNAME = __CLASS__;
12+
1213
/**
1314
* @Id @Column(type="integer")
1415
* @GeneratedValue
1516
*/
1617
public $id;
18+
1719
/**
1820
* @Column(type="string", length=255, unique=true)
1921
*/
2022
public $username;
23+
2124
/**
2225
* @OneToMany(targetEntity="DDC3346Article", mappedBy="user", fetch="EAGER", cascade={"detach"})
2326
*/
24-
public $articles;
27+
public $articles = array();
2528
}

0 commit comments

Comments
 (0)