Skip to content

Commit c265397

Browse files
committed
Adding Doctrine tests
1 parent 686d449 commit c265397

33 files changed

+831
-1125
lines changed

SOB/Doctrine/Entity/Customer.php

Lines changed: 57 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -6,103 +6,66 @@
66

77
/**
88
* This code is automatically generated. See SOB\Doctrine\scaffolding\generateModels.php. Do not update by hand.
9-
*
10-
* @ORM\Entity
11-
* @ORM\Table(name="customer")
129
*/
10+
#[\Doctrine\ORM\Mapping\Entity]
11+
#[\Doctrine\ORM\Mapping\Table(name: "customer")]
1312
class Customer
1413
{
15-
/**
16-
* @ORM\{Id}
17-
* @ORM\{GeneratedValue(strategy="AUTO")}
18-
* @ORM\Column(type="integer")
19-
*/
20-
public int customer_id;
21-
22-
/**
23-
* @ORM\Column(type=string, length=50, nullable=true)
24-
*/
25-
public ?string company = NULL;
26-
27-
/**
28-
* @ORM\Column(type=string, length=50, nullable=true)
29-
*/
30-
public ?string last_name = NULL;
31-
32-
/**
33-
* @ORM\Column(type=string, length=50, nullable=true)
34-
*/
35-
public ?string first_name = NULL;
36-
37-
/**
38-
* @ORM\Column(type=string, length=50, nullable=true)
39-
*/
40-
public ?string email_address = NULL;
41-
42-
/**
43-
* @ORM\Column(type=string, length=50, nullable=true)
44-
*/
45-
public ?string job_title = NULL;
46-
47-
/**
48-
* @ORM\Column(type=string, length=25, nullable=true)
49-
*/
50-
public ?string business_phone = NULL;
51-
52-
/**
53-
* @ORM\Column(type=string, length=25, nullable=true)
54-
*/
55-
public ?string home_phone = NULL;
56-
57-
/**
58-
* @ORM\Column(type=string, length=25, nullable=true)
59-
*/
60-
public ?string mobile_phone = NULL;
61-
62-
/**
63-
* @ORM\Column(type=string, length=25, nullable=true)
64-
*/
65-
public ?string fax_number = NULL;
66-
67-
/**
68-
* @ORM\Column(type="longtext", nullable=true)
69-
*/
70-
public ?string address = NULL;
71-
72-
/**
73-
* @ORM\Column(type=string, length=50, nullable=true)
74-
*/
75-
public ?string city = NULL;
76-
77-
/**
78-
* @ORM\Column(type=string, length=50, nullable=true)
79-
*/
80-
public ?string state_province = NULL;
81-
82-
/**
83-
* @ORM\Column(type=string, length=15, nullable=true)
84-
*/
85-
public ?string zip_postal_code = NULL;
86-
87-
/**
88-
* @ORM\Column(type=string, length=50, nullable=true)
89-
*/
90-
public ?string country_region = NULL;
91-
92-
/**
93-
* @ORM\Column(type="longtext", nullable=true)
94-
*/
95-
public ?string web_page = NULL;
96-
97-
/**
98-
* @ORM\Column(type="longtext", nullable=true)
99-
*/
100-
public ?string notes = NULL;
101-
102-
/**
103-
* @ORM\Column(type="longblob", nullable=true)
104-
*/
105-
public ?string attachments = NULL;
14+
#[\Doctrine\ORM\Mapping\Id]
15+
#[\Doctrine\ORM\Mapping\GeneratedValue(strategy: "AUTO")]
16+
#[\Doctrine\ORM\Mapping\Column(type: "integer")]
17+
public int $customer_id;
18+
19+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
20+
public ?string $company = NULL;
21+
22+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
23+
public ?string $last_name = NULL;
24+
25+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
26+
public ?string $first_name = NULL;
27+
28+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
29+
public ?string $email_address = NULL;
30+
31+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
32+
public ?string $job_title = NULL;
33+
34+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
35+
public ?string $business_phone = NULL;
36+
37+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
38+
public ?string $home_phone = NULL;
39+
40+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
41+
public ?string $mobile_phone = NULL;
42+
43+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
44+
public ?string $fax_number = NULL;
45+
46+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
47+
public ?string $address = NULL;
48+
49+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
50+
public ?string $city = NULL;
51+
52+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
53+
public ?string $state_province = NULL;
54+
55+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 15, nullable: true)]
56+
public ?string $zip_postal_code = NULL;
57+
58+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
59+
public ?string $country_region = NULL;
60+
61+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
62+
public ?string $web_page = NULL;
63+
64+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
65+
public ?string $notes = NULL;
66+
67+
#[\Doctrine\ORM\Mapping\Column(type: "blob", nullable: true)]
68+
public ?string $attachments = NULL;
10669

10770

10871
}

SOB/Doctrine/Entity/DateRecord.php

Lines changed: 24 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -6,48 +6,33 @@
66

77
/**
88
* This code is automatically generated. See SOB\Doctrine\scaffolding\generateModels.php. Do not update by hand.
9-
*
10-
* @ORM\Entity
11-
* @ORM\Table(name="dateRecord")
129
*/
10+
#[\Doctrine\ORM\Mapping\Entity]
11+
#[\Doctrine\ORM\Mapping\Table(name: "dateRecord")]
1312
class DateRecord
1413
{
15-
/**
16-
* @ORM\{Id}
17-
* @ORM\{GeneratedValue(strategy="AUTO")}
18-
* @ORM\Column(type="integer")
19-
*/
20-
public int dateRecordId;
21-
22-
/**
23-
* @ORM\Column(type="date")
24-
*/
25-
public string dateRequired;
26-
27-
/**
28-
* @ORM\Column(type="date", nullable=true)
29-
*/
30-
public ?string dateDefaultNull = NULL;
31-
32-
/**
33-
* @ORM\Column(type="date", options={"default": "2000-01-02"}, nullable=true)
34-
*/
35-
public ?string dateDefaultNullable = '2000-01-02';
36-
37-
/**
38-
* @ORM\Column(type="date", options={"default": "2000-01-02"})
39-
*/
40-
public string dateDefaultNotNull = '2000-01-02';
41-
42-
/**
43-
* @ORM\Column(type="timestamp", options={"default": "CURRENT_TIMESTAMP"}, nullable=true)
44-
*/
45-
public ?string timestampDefaultCurrentNullable;
46-
47-
/**
48-
* @ORM\Column(type="timestamp", options={"default": "CURRENT_TIMESTAMP"})
49-
*/
50-
public string timestampDefaultCurrentNotNull;
14+
#[\Doctrine\ORM\Mapping\Id]
15+
#[\Doctrine\ORM\Mapping\GeneratedValue(strategy: "AUTO")]
16+
#[\Doctrine\ORM\Mapping\Column(type: "integer")]
17+
public int $dateRecordId;
18+
19+
#[\Doctrine\ORM\Mapping\Column(type: "date")]
20+
public string $dateRequired;
21+
22+
#[\Doctrine\ORM\Mapping\Column(type: "date", nullable: true)]
23+
public ?string $dateDefaultNull = NULL;
24+
25+
#[\Doctrine\ORM\Mapping\Column(type: "date", options: ["default" => "2000-01-02"], nullable: true)]
26+
public ?string $dateDefaultNullable = '2000-01-02';
27+
28+
#[\Doctrine\ORM\Mapping\Column(type: "date", options: ["default" => "2000-01-02"])]
29+
public string $dateDefaultNotNull = '2000-01-02';
30+
31+
#[\Doctrine\ORM\Mapping\Column(type: "timestamp", options: ["default" => "CURRENT_TIMESTAMP"], nullable: true)]
32+
public ?string $timestampDefaultCurrentNullable;
33+
34+
#[\Doctrine\ORM\Mapping\Column(type: "timestamp", options: ["default" => "CURRENT_TIMESTAMP"])]
35+
public string $timestampDefaultCurrentNotNull;
5136

5237

5338
}

SOB/Doctrine/Entity/Employee.php

Lines changed: 57 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -6,103 +6,66 @@
66

77
/**
88
* This code is automatically generated. See SOB\Doctrine\scaffolding\generateModels.php. Do not update by hand.
9-
*
10-
* @ORM\Entity
11-
* @ORM\Table(name="employee")
129
*/
10+
#[\Doctrine\ORM\Mapping\Entity]
11+
#[\Doctrine\ORM\Mapping\Table(name: "employee")]
1312
class Employee
1413
{
15-
/**
16-
* @ORM\{Id}
17-
* @ORM\{GeneratedValue(strategy="AUTO")}
18-
* @ORM\Column(type="integer")
19-
*/
20-
public int employee_id;
21-
22-
/**
23-
* @ORM\Column(type=string, length=50, nullable=true)
24-
*/
25-
public ?string company = NULL;
26-
27-
/**
28-
* @ORM\Column(type=string, length=50, nullable=true)
29-
*/
30-
public ?string last_name = NULL;
31-
32-
/**
33-
* @ORM\Column(type=string, length=50, nullable=true)
34-
*/
35-
public ?string first_name = NULL;
36-
37-
/**
38-
* @ORM\Column(type=string, length=50, nullable=true)
39-
*/
40-
public ?string email_address = NULL;
41-
42-
/**
43-
* @ORM\Column(type=string, length=50, nullable=true)
44-
*/
45-
public ?string job_title = NULL;
46-
47-
/**
48-
* @ORM\Column(type=string, length=25, nullable=true)
49-
*/
50-
public ?string business_phone = NULL;
51-
52-
/**
53-
* @ORM\Column(type=string, length=25, nullable=true)
54-
*/
55-
public ?string home_phone = NULL;
56-
57-
/**
58-
* @ORM\Column(type=string, length=25, nullable=true)
59-
*/
60-
public ?string mobile_phone = NULL;
61-
62-
/**
63-
* @ORM\Column(type=string, length=25, nullable=true)
64-
*/
65-
public ?string fax_number = NULL;
66-
67-
/**
68-
* @ORM\Column(type="longtext", nullable=true)
69-
*/
70-
public ?string address = NULL;
71-
72-
/**
73-
* @ORM\Column(type=string, length=50, nullable=true)
74-
*/
75-
public ?string city = NULL;
76-
77-
/**
78-
* @ORM\Column(type=string, length=50, nullable=true)
79-
*/
80-
public ?string state_province = NULL;
81-
82-
/**
83-
* @ORM\Column(type=string, length=15, nullable=true)
84-
*/
85-
public ?string zip_postal_code = NULL;
86-
87-
/**
88-
* @ORM\Column(type=string, length=50, nullable=true)
89-
*/
90-
public ?string country_region = NULL;
91-
92-
/**
93-
* @ORM\Column(type="longtext", nullable=true)
94-
*/
95-
public ?string web_page = NULL;
96-
97-
/**
98-
* @ORM\Column(type="longtext", nullable=true)
99-
*/
100-
public ?string notes = NULL;
101-
102-
/**
103-
* @ORM\Column(type="longblob", nullable=true)
104-
*/
105-
public ?string attachments = NULL;
14+
#[\Doctrine\ORM\Mapping\Id]
15+
#[\Doctrine\ORM\Mapping\GeneratedValue(strategy: "AUTO")]
16+
#[\Doctrine\ORM\Mapping\Column(type: "integer")]
17+
public int $employee_id;
18+
19+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
20+
public ?string $company = NULL;
21+
22+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
23+
public ?string $last_name = NULL;
24+
25+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
26+
public ?string $first_name = NULL;
27+
28+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
29+
public ?string $email_address = NULL;
30+
31+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
32+
public ?string $job_title = NULL;
33+
34+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
35+
public ?string $business_phone = NULL;
36+
37+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
38+
public ?string $home_phone = NULL;
39+
40+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
41+
public ?string $mobile_phone = NULL;
42+
43+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 25, nullable: true)]
44+
public ?string $fax_number = NULL;
45+
46+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
47+
public ?string $address = NULL;
48+
49+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
50+
public ?string $city = NULL;
51+
52+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
53+
public ?string $state_province = NULL;
54+
55+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 15, nullable: true)]
56+
public ?string $zip_postal_code = NULL;
57+
58+
#[\Doctrine\ORM\Mapping\Column(type: "string", length: 50, nullable: true)]
59+
public ?string $country_region = NULL;
60+
61+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
62+
public ?string $web_page = NULL;
63+
64+
#[\Doctrine\ORM\Mapping\Column(type: "text", nullable: true)]
65+
public ?string $notes = NULL;
66+
67+
#[\Doctrine\ORM\Mapping\Column(type: "blob", nullable: true)]
68+
public ?string $attachments = NULL;
10669

10770

10871
}

0 commit comments

Comments
 (0)