@@ -102,7 +102,10 @@ public function testPreInsertWillReturnLastInsertValueIfPrimaryKeySetInColumnsDa
102
102
$ platform ->expects ($ this ->any ())
103
103
->method ('quoteIdentifier ' )
104
104
->will ($ this ->returnValue ($ this ->sequenceName ));
105
- $ adapter = $ this ->getMock ('Zend\Db\Adapter\Adapter ' , ['getPlatform ' , 'createStatement ' ], [], '' , false );
105
+ $ adapter = $ this ->getMockBuilder ('Zend\Db\Adapter\Adapter ' )
106
+ ->setMethods (['getPlatform ' , 'createStatement ' ])
107
+ ->disableOriginalConstructor ()
108
+ ->getMock ();
106
109
$ adapter ->expects ($ this ->any ())
107
110
->method ('getPlatform ' )
108
111
->will ($ this ->returnValue ($ platform ));
@@ -123,7 +126,10 @@ public function testPreInsertWillReturnLastInsertValueIfPrimaryKeySetInColumnsDa
123
126
->will ($ this ->returnValue ($ statement ));
124
127
$ this ->tableGateway = $ this ->getMockForAbstractClass ('Zend\Db\TableGateway\TableGateway ' , ['table ' , $ adapter ], '' , true );
125
128
$ this ->feature ->setTableGateway ($ this ->tableGateway );
126
- $ insert = $ this ->getMock ('Zend\Db\Sql\Insert ' , ['getPlatform ' , 'createStatement ' , 'getRawState ' ], [], '' , false );
129
+ $ insert = $ this ->getMockBuilder ('Zend\Db\Sql\Insert ' )
130
+ ->setMethods (['getPlatform ' , 'createStatement ' , 'getRawState ' ])
131
+ ->disableOriginalConstructor ()
132
+ ->getMock ();
127
133
$ insert ->expects ($ this ->at (0 ))
128
134
->method ('getRawState ' )
129
135
->with ('columns ' )
@@ -135,13 +141,17 @@ public function testPreInsertWillReturnLastInsertValueIfPrimaryKeySetInColumnsDa
135
141
136
142
public function nextSequenceIdProvider ()
137
143
{
138
- return [['PostgreSQL ' , 'SELECT NEXTVAL( \'" ' . $ this ->sequenceName . '" \') ' ],
139
- ['Oracle ' , 'SELECT ' . $ this ->sequenceName . '.NEXTVAL as "nextval" FROM dual ' ]];
144
+ return [
145
+ ['PostgreSQL ' , 'SELECT NEXTVAL( \'" ' . $ this ->sequenceName . '" \') ' ],
146
+ ['Oracle ' , 'SELECT ' . $ this ->sequenceName . '.NEXTVAL as "nextval" FROM dual ' ],
147
+ ];
140
148
}
141
149
142
150
public function lastSequenceIdProvider ()
143
151
{
144
- return [['PostgreSQL ' , 'SELECT CURRVAL( \'' . $ this ->sequenceName . '\') ' ],
145
- ['Oracle ' , 'SELECT ' . $ this ->sequenceName . '.CURRVAL as "currval" FROM dual ' ]];
152
+ return [
153
+ ['PostgreSQL ' , 'SELECT CURRVAL( \'' . $ this ->sequenceName . '\') ' ],
154
+ ['Oracle ' , 'SELECT ' . $ this ->sequenceName . '.CURRVAL as "currval" FROM dual ' ],
155
+ ];
146
156
}
147
157
}
0 commit comments