-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathSkipFirstStepUsingClosureFlowTest.php
More file actions
31 lines (25 loc) · 1.1 KB
/
Copy pathSkipFirstStepUsingClosureFlowTest.php
File metadata and controls
31 lines (25 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
namespace Craue\FormFlowBundle\Tests\Flow;
use Craue\FormFlowBundle\Tests\IntegrationTestCase;
/**
* @group integration
*
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2011-2015 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class SkipFirstStepUsingClosureFlowTest extends IntegrationTestCase {
public function testSkipFirstStepUsingClosure() {
$crawler = $this->client->request('GET', $this->url('_FormFlow_skipFirstStepUsingClosure'));
$this->assertSame(200, $this->client->getResponse()->getStatusCode());
$this->assertCurrentStepNumber(2, $crawler);
// step 1 must be marked as skipped
$this->assertContains('<li class="craue_formflow_skipped_step">step1</li>', $this->getHtml($crawler->filter('#step-list')));
// reset
$form = $crawler->selectButton('start over')->form();
$crawler = $this->client->submit($form);
$this->assertCurrentStepNumber(2, $crawler);
// step 1 must be marked as skipped
$this->assertContains('<li class="craue_formflow_skipped_step">step1</li>', $this->getHtml($crawler->filter('#step-list')));
}
}