Skip to content

Commit cb527be

Browse files
committed
updated mocks to use request->input instead of request->get
1 parent 762dc56 commit cb527be

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

tests/Fields/CheckboxTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ public function testCanCheckMultipleCheckboxesAtOnce()
208208

209209
public function testCanRepopulateCheckboxesFromPost()
210210
{
211-
$this->request->shouldReceive('get')->with('_token', '', true)->andReturn('');
212-
$this->request->shouldReceive('get')->with('foo', '', true)->andReturn('');
213-
$this->request->shouldReceive('get')->with('foo_0', '', true)->andReturn(true);
214-
$this->request->shouldReceive('get')->with('foo_1', '', true)->andReturn(false);
211+
$this->request->shouldReceive('input')->with('_token', '', true)->andReturn('');
212+
$this->request->shouldReceive('input')->with('foo', '', true)->andReturn('');
213+
$this->request->shouldReceive('input')->with('foo_0', '', true)->andReturn(true);
214+
$this->request->shouldReceive('input')->with('foo_1', '', true)->andReturn(false);
215215

216216
$checkboxes = $this->former->checkboxes('foo')->checkboxes('foo', 'bar')->__toString();
217217
$matcher = $this->controlGroup($this->matchCheckedCheckbox('foo_0', 'Foo').$this->matchCheckbox('foo_1', 'Bar'));
@@ -280,7 +280,7 @@ public function testCanPushASingleCheckbox()
280280
public function testCanRepopulateCheckboxesOnSubmit()
281281
{
282282
$this->mockConfig(array('push_checkboxes' => true));
283-
$this->request->shouldReceive('get')->andReturn('');
283+
$this->request->shouldReceive('input')->andReturn('');
284284

285285
$checkbox = $this->former->checkbox('foo')->text('foo')->__toString();
286286
$matcher = $this->controlGroup(

tests/Fields/RadioTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ public function testCanAttributeIndividualLabelsPerRadio()
207207

208208
public function testRepopulateFromPost()
209209
{
210-
$this->request->shouldReceive('get')->andReturn(0);
210+
$this->request->shouldReceive('input')->andReturn(0);
211211

212212
$radios = $this->former->radios('foo')->radios('foo', 'bar')->__toString();
213213
$matcher = $this->controlGroup($this->matchCheckedRadio('foo', 'Foo', 0).$this->matchRadio('foo2', 'Bar', 1));

tests/Fields/SelectTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -350,8 +350,8 @@ public function testOptionsSelectActsTheSameAsSelect()
350350
public function testCanRepopulateArrayNotation()
351351
{
352352
$options = array('foo', 'bar');
353-
$this->request->shouldReceive('get')->with('_token', '', true)->andReturn('foobar');
354-
$this->request->shouldReceive('get')->with('foo', '', true)->andReturn(array(0, 1));
353+
$this->request->shouldReceive('input')->with('_token', '', true)->andReturn('foobar');
354+
$this->request->shouldReceive('input')->with('foo', '', true)->andReturn(array(0, 1));
355355

356356
$select = $this->former->select('foo[]')->options($options);
357357
$matcher = '<select id="foo[]" name="foo[]"><option value="0" selected="selected">foo</option><option value="1" selected="selected">bar</option></select>';
@@ -362,8 +362,8 @@ public function testCanRepopulateArrayNotation()
362362
public function testMultiselectRepopulationDoesntCreateOptions()
363363
{
364364
$options = array(1 => 'foo', 2 => 'bar');
365-
$this->request->shouldReceive('get')->with('_token', '', true)->andReturn('foobar');
366-
$this->request->shouldReceive('get')->with('foo', '', true)->andReturn(array(1));
365+
$this->request->shouldReceive('input')->with('_token', '', true)->andReturn('foobar');
366+
$this->request->shouldReceive('input')->with('foo', '', true)->andReturn(array(1));
367367

368368
$select = $this->former->multiselect('foo')->options($options);
369369
$matcher = '<select id="foo" multiple="true" name="foo[]"><option value="1" selected="selected">foo</option><option value="2">bar</option></select>';

0 commit comments

Comments
 (0)