@@ -58,24 +58,24 @@ class StructureTestCase extends TestCase
58
58
['name ' => 'books_view ' , 'view ' => TRUE ],
59
59
]);
60
60
$ this ->driver ->shouldReceive ('getColumns ' )->with ('authors ' )->once ()->andReturn ([
61
- ['name ' => 'id ' , 'primary ' => TRUE , 'vendor ' => ['sequence ' => '"public"."authors_id_seq" ' ]],
62
- ['name ' => 'name ' , 'primary ' => FALSE , 'vendor ' => []],
61
+ ['name ' => 'id ' , 'primary ' => TRUE , 'autoincrement ' => TRUE , ' vendor ' => ['sequence ' => '"public"."authors_id_seq" ' ]],
62
+ ['name ' => 'name ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
63
63
]);
64
64
$ this ->driver ->shouldReceive ('getColumns ' )->with ('Books ' )->once ()->andReturn ([
65
- ['name ' => 'id ' , 'primary ' => TRUE , 'vendor ' => ['sequence ' => '"public"."Books_id_seq" ' ]],
66
- ['name ' => 'title ' , 'primary ' => FALSE , 'vendor ' => []],
65
+ ['name ' => 'id ' , 'primary ' => TRUE , 'autoincrement ' => TRUE , ' vendor ' => ['sequence ' => '"public"."Books_id_seq" ' ]],
66
+ ['name ' => 'title ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
67
67
]);
68
68
$ this ->driver ->shouldReceive ('getColumns ' )->with ('tags ' )->once ()->andReturn ([
69
- ['name ' => 'id ' , 'primary ' => TRUE , 'vendor ' => []],
70
- ['name ' => 'name ' , 'primary ' => FALSE , 'vendor ' => []],
69
+ ['name ' => 'id ' , 'primary ' => TRUE , 'autoincrement ' => TRUE , ' vendor ' => []],
70
+ ['name ' => 'name ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
71
71
]);
72
72
$ this ->driver ->shouldReceive ('getColumns ' )->with ('books_x_tags ' )->once ()->andReturn ([
73
- ['name ' => 'book_id ' , 'primary ' => TRUE , 'vendor ' => []],
74
- ['name ' => 'tag_id ' , 'primary ' => TRUE , 'vendor ' => []],
73
+ ['name ' => 'book_id ' , 'primary ' => TRUE , 'autoincrement ' => FALSE , ' vendor ' => []],
74
+ ['name ' => 'tag_id ' , 'primary ' => TRUE , 'autoincrement ' => FALSE , ' vendor ' => []],
75
75
]);
76
76
$ this ->driver ->shouldReceive ('getColumns ' )->with ('books_view ' )->once ()->andReturn ([
77
- ['name ' => 'id ' , 'primary ' => FALSE , 'vendor ' => []],
78
- ['name ' => 'title ' , 'primary ' => FALSE , 'vendor ' => []],
77
+ ['name ' => 'id ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
78
+ ['name ' => 'title ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
79
79
]);
80
80
$ this ->connection ->shouldReceive ('getSupplementalDriver ' )->times (4 )->andReturn ($ this ->driver );
81
81
$ this ->driver ->shouldReceive ('getForeignKeys ' )->with ('authors ' )->once ()->andReturn ([]);
@@ -108,8 +108,8 @@ class StructureTestCase extends TestCase
108
108
public function testGetColumns ()
109
109
{
110
110
$ columns = [
111
- ['name ' => 'id ' , 'primary ' => TRUE , 'vendor ' => []],
112
- ['name ' => 'name ' , 'primary ' => FALSE , 'vendor ' => []],
111
+ ['name ' => 'id ' , 'primary ' => TRUE , 'autoincrement ' => TRUE , ' vendor ' => []],
112
+ ['name ' => 'name ' , 'primary ' => FALSE , 'autoincrement ' => FALSE , ' vendor ' => []],
113
113
];
114
114
115
115
Assert::same ($ columns , $ this ->structure ->getColumns ('tags ' ));
@@ -138,9 +138,9 @@ class StructureTestCase extends TestCase
138
138
$ this ->driver ->shouldReceive ('isSupported ' )->with ('sequence ' )->once ()->andReturn (FALSE );
139
139
$ this ->driver ->shouldReceive ('isSupported ' )->with ('sequence ' )->times (3 )->andReturn (TRUE );
140
140
141
- Assert::null ( $ this ->structure ->getPrimaryKeySequence ('Authors ' ));
142
- Assert::same (' "public"."authors_id_seq" ' , $ this ->structure ->getPrimaryKeySequence ('Authors ' ));
143
- Assert::null ( $ this ->structure ->getPrimaryKeySequence ('tags ' ));
141
+ Assert::same ([ ' name ' => ' id ' , ' sequence ' => NULL ], $ this ->structure ->getPrimaryKeySequence ('Authors ' ));
142
+ Assert::same ([ ' name ' => ' id ' , ' sequence ' => ' "public"."authors_id_seq" '] , $ this ->structure ->getPrimaryKeySequence ('Authors ' ));
143
+ Assert::same ([ ' name ' => ' id ' , ' sequence ' => NULL ] , $ this ->structure ->getPrimaryKeySequence ('tags ' ));
144
144
Assert::null ($ this ->structure ->getPrimaryKeySequence ('books_x_tags ' ));
145
145
}
146
146
0 commit comments