File tree Expand file tree Collapse file tree 3 files changed +21
-12
lines changed
Expand file tree Collapse file tree 3 files changed +21
-12
lines changed Original file line number Diff line number Diff line change 11Feature : Add a Cargo
2- In order to ship a Cargo
2+ In order to handle a Cargo
33 As a booking manager
44 I need to be able to add a new Cargo
55
Original file line number Diff line number Diff line change 1+ Feature : Add a Voyage
2+ In order to manage a Voyage
3+ As a booking manager
4+ I need to be able to add a new Voyage
5+
6+ @javascript
7+ Scenario : Add a new Voyage
8+ Given I am on "application/voyage/add"
9+ When I fill in "voyage_number" with "SHIP123"
10+ And I fill in "name" with "HongkongToHamburg"
11+ And I fill in "capacity" with "50"
12+ And I click the submit button
13+ Then the url should match "application/voyage/index"
Original file line number Diff line number Diff line change @@ -51,19 +51,15 @@ static public function iniializeZendFramework()
5151 }
5252
5353 /**
54- * @BeforeScenario
54+ * @BeforeFeature
5555 */
56- public function clearDatabase ()
56+ public static function clearDatabase ()
5757 {
58- //to stuff here
59- }
60-
61- /**
62- * @return ServiceManager
63- */
64- private function getServiceManager ()
65- {
66- return self ::$ zendApp ->getServiceManager ();
58+ $ em = self ::$ zendApp ->getServiceManager ()->get ('doctrine.entitymanager.orm_default ' );
59+ $ q = $ em ->createQuery ('delete from Application\Domain\Model\Cargo\Cargo ' );
60+ $ q ->execute ();
61+ $ q = $ em ->createQuery ('delete from Application\Domain\Model\Voyage\Voyage ' );
62+ $ q ->execute ();
6763 }
6864
6965 /**
You can’t perform that action at this time.
0 commit comments