| @@ 110-122 (lines=13) @@ | ||
| 107 | } |
|
| 108 | ||
| 109 | /** @test */ |
|
| 110 | public function it_is_not_submitted_by_default() |
|
| 111 | { |
|
| 112 | $request = $this->request(); |
|
| 113 | $request->method('get')->will($this->returnValueMap([ |
|
| 114 | ['foo', false], |
|
| 115 | ]) |
|
| 116 | ); |
|
| 117 | ||
| 118 | $form = $this->form($request); |
|
| 119 | $form->button('foo'); |
|
| 120 | ||
| 121 | $this->assertFalse($form->submitted()); |
|
| 122 | } |
|
| 123 | ||
| 124 | /** @test */ |
|
| 125 | public function it_can_be_submitted() |
|
| @@ 125-137 (lines=13) @@ | ||
| 122 | } |
|
| 123 | ||
| 124 | /** @test */ |
|
| 125 | public function it_can_be_submitted() |
|
| 126 | { |
|
| 127 | $request = $this->request(); |
|
| 128 | $request->method('get')->will($this->returnValueMap([ |
|
| 129 | ['foo', true], |
|
| 130 | ]) |
|
| 131 | ); |
|
| 132 | ||
| 133 | $form = $this->form($request); |
|
| 134 | $form->button('foo'); |
|
| 135 | ||
| 136 | $this->assertTrue($form->submitted()); |
|
| 137 | } |
|
| 138 | ||
| 139 | /** @test */ |
|
| 140 | public function it_can_detect_which_submit_button_was_clicked() |
|