@@ 57-63 (lines=7) @@ | ||
54 | /** |
|
55 | * @Given /^I am (building|viewing|editing) (teamspeak) instance "([^""]*)"$/ |
|
56 | */ |
|
57 | public function iAmDoingSomethingWithVoipResourceByName($action, $type, $name) |
|
58 | { |
|
59 | $action = str_replace(array_keys($this->actions), array_values($this->actions), $action); |
|
60 | $resource = $this->findOneBy('instance', array('name' => $name), $type); |
|
61 | ||
62 | $this->getSession()->visit($this->generatePageUrl(sprintf('%s_instance_%s', $type, $action), array('id' => $resource->getId(), 'serverId' => $resource->getServer()->getId()))); |
|
63 | } |
|
64 | ||
65 | /** |
|
66 | * @Then /^I should be (building|viewing|editing) (teamspeak) instance "([^""]*)"$/ |
|
@@ 69-76 (lines=8) @@ | ||
66 | * @Then /^I should be (building|viewing|editing) (teamspeak) instance "([^""]*)"$/ |
|
67 | * @Then /^I should still be (building|viewing|editing) (teamspeak) instance "([^""]*)"$/ |
|
68 | */ |
|
69 | public function iShouldBeDoingSomethingWithVoipResourceByName($action, $type, $name) |
|
70 | { |
|
71 | $action = str_replace(array_keys($this->actions), array_values($this->actions), $action); |
|
72 | $resource = $this->findOneBy('instance', array('name' => $name), $type); |
|
73 | ||
74 | $this->assertSession()->addressEquals($this->generatePageUrl(sprintf('%s_instance_%s', $type, $action), array('id' => $resource->getId(), 'serverId' => $resource->getServer()->getId()))); |
|
75 | $this->assertStatusCodeEquals(200); |
|
76 | } |
|
77 | ||
78 | /** |
|
79 | * @Then /^I should be on the page of ([^""(w)]*) server "([^""]*)"$/ |