Rajout de doctrine/orm
[zf2.biz/galerie.git] / vendor / doctrine / orm / tests / Doctrine / Tests / ORM / Tools / Pagination / PaginationTestCase.php
1 <?php
2
3 namespace Doctrine\Tests\ORM\Tools\Pagination;
4
5 use Doctrine\Tests\OrmTestCase;
6
7 abstract class PaginationTestCase extends OrmTestCase
8 {
9     public $entityManager;
10
11     public function setUp()
12     {
13         $this->entityManager = $this->_getTestEntityManager();
14     }
15 }
16
17
18 /**
19 * @Entity
20 */
21 class MyBlogPost
22 {
23
24     /** @Id @column(type="integer") @generatedValue */
25     public $id;
26     /**
27      * @ManyToOne(targetEntity="Author")
28      */
29     public $author;
30     /**
31      * @ManyToOne(targetEntity="Category")
32      */
33     public $category;
34 }
35
36 /**
37  * @Entity
38  */
39 class MyAuthor
40 {
41
42     /** @Id @column(type="integer") @generatedValue */
43     public $id;
44
45 }
46
47 /**
48 * @Entity
49 */
50 class MyCategory
51 {
52
53     /** @id @column(type="integer") @generatedValue */
54     public $id;
55
56 }
57
58
59 /**
60  * @Entity
61  */
62 class BlogPost
63 {
64
65     /** @Id @column(type="integer") @generatedValue */
66     public $id;
67     /**
68      * @ManyToOne(targetEntity="Author")
69      */
70     public $author;
71     /**
72      * @ManyToOne(targetEntity="Category")
73      */
74     public $category;
75 }
76
77 /**
78  * @Entity
79  */
80 class Author
81 {
82
83     /** @Id @column(type="integer") @generatedValue */
84     public $id;
85     /** @Column(type="string") */
86     public $name;
87
88 }
89
90 /**
91  * @Entity
92  */
93 class Person
94 {
95
96     /** @Id @column(type="integer") @generatedValue */
97     public $id;
98     /** @Column(type="string") */
99     public $name;
100     /** @Column(type="string") */
101     public $biography;
102
103 }
104
105 /**
106  * @Entity
107  */
108 class Category
109 {
110
111     /** @id @column(type="integer") @generatedValue */
112     public $id;
113
114 }
115
116
117 /** @Entity @Table(name="groups") */
118 class Group
119 {
120
121     /** @Id @column(type="integer") @generatedValue */
122     public $id;
123     /** @ManyToMany(targetEntity="User", mappedBy="groups") */
124     public $users;
125 }
126
127 /** @Entity */
128 class User
129 {
130
131     /** @Id @column(type="integer") @generatedValue */
132     public $id;
133     /**
134      * @ManyToMany(targetEntity="Group", inversedBy="users")
135      * @JoinTable(
136      * name="user_group",
137      * joinColumns = {@JoinColumn(name="user_id", referencedColumnName="id")},
138      * inverseJoinColumns = {@JoinColumn(name="group_id", referencedColumnName="id")}
139      * )
140      */
141     public $groups;
142 }