@@ -129,8 +129,8 @@ public function testPostgresSearchPathCommaSeparatedValueSupported()
129
129
$ config = ['host ' => 'foo ' , 'database ' => 'bar ' , 'search_path ' => 'public, "user" ' , 'charset ' => 'utf8 ' ];
130
130
$ connector = $ this ->getMockBuilder ('Illuminate\Database\Connectors\PostgresConnector ' )->setMethods (['createConnection ' , 'getOptions ' ])->getMock ();
131
131
$ connection = m::mock ('stdClass ' );
132
- $ connector ->expects ($ this ->once ())->method ('getOptions ' )->with ($ this ->equalTo ($ config ))->will ( $ this -> returnValue ( ['options ' ]) );
133
- $ connector ->expects ($ this ->once ())->method ('createConnection ' )->with ($ this ->equalTo ($ dsn ), $ this ->equalTo ($ config ), $ this ->equalTo (['options ' ]))->will ( $ this -> returnValue ( $ connection) );
132
+ $ connector ->expects ($ this ->once ())->method ('getOptions ' )->with ($ this ->equalTo ($ config ))->willReturn ( ['options ' ]);
133
+ $ connector ->expects ($ this ->once ())->method ('createConnection ' )->with ($ this ->equalTo ($ dsn ), $ this ->equalTo ($ config ), $ this ->equalTo (['options ' ]))->willReturn ( $ connection );
134
134
$ connection ->shouldReceive ('prepare ' )->once ()->with ('set names \'utf8 \'' )->andReturn ($ connection );
135
135
$ connection ->shouldReceive ('prepare ' )->once ()->with ('set search_path to "public", "user" ' )->andReturn ($ connection );
136
136
$ connection ->shouldReceive ('execute ' )->twice ();
@@ -145,8 +145,8 @@ public function testPostgresSearchPathVariablesSupported()
145
145
$ config = ['host ' => 'foo ' , 'database ' => 'bar ' , 'search_path ' => '"$user", public, user ' , 'charset ' => 'utf8 ' ];
146
146
$ connector = $ this ->getMockBuilder ('Illuminate\Database\Connectors\PostgresConnector ' )->setMethods (['createConnection ' , 'getOptions ' ])->getMock ();
147
147
$ connection = m::mock ('stdClass ' );
148
- $ connector ->expects ($ this ->once ())->method ('getOptions ' )->with ($ this ->equalTo ($ config ))->will ( $ this -> returnValue ( ['options ' ]) );
149
- $ connector ->expects ($ this ->once ())->method ('createConnection ' )->with ($ this ->equalTo ($ dsn ), $ this ->equalTo ($ config ), $ this ->equalTo (['options ' ]))->will ( $ this -> returnValue ( $ connection) );
148
+ $ connector ->expects ($ this ->once ())->method ('getOptions ' )->with ($ this ->equalTo ($ config ))->willReturn ( ['options ' ]);
149
+ $ connector ->expects ($ this ->once ())->method ('createConnection ' )->with ($ this ->equalTo ($ dsn ), $ this ->equalTo ($ config ), $ this ->equalTo (['options ' ]))->willReturn ( $ connection );
150
150
$ connection ->shouldReceive ('prepare ' )->once ()->with ('set names \'utf8 \'' )->andReturn ($ connection );
151
151
$ connection ->shouldReceive ('prepare ' )->once ()->with ('set search_path to "$user", "public", "user" ' )->andReturn ($ connection );
152
152
$ connection ->shouldReceive ('execute ' )->twice ();
0 commit comments