Skip to content

Commit 2260d6f

Browse files
committed
Finished adding node features
1 parent a74b588 commit 2260d6f

8 files changed

+103
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Feature: Follow the given lifecycle transition on the current node
2+
In order to progress the lifecycle state of a node
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded
9+
10+
Scenario: Follow lifecycle transition
11+
Given the current node is "/tests_general_base"
12+
And I execute the "node:lifecycle:follow-transition foo" command
13+
Then the command should not fail
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Feature: List the possible lifecycle transitions for the current node
2+
In order to progress the lifecycle state of a node
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded
9+
10+
Scenario: List possible lifecycle transitions
11+
Given the current node is "/tests_general_base"
12+
And I execute the "node:lifecycle:list" command
13+
Then the command should not fail
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Feature: Remove the current node from any shared set to which it belongs
2+
In order to remove the current node from its corresponding shared set
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded into workspace "workspace_a"
9+
And the "session_data.xml" fixtures are loaded into workspace "workspace_b"
10+
And the node at "/tests_general_base" in "workspace_a" is cloned to "/foobar" in "workspace_b"
11+
12+
Scenario: Rename a node
13+
Given the current node is "/tests_general_base"
14+
And I execute the "node:shared:show" command
15+
Then the command should not fail

features/node_shared_show.feature

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Feature: Show the current nodes shared set
2+
In order to show the shared set to which the current node belongs
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded into workspace "workspace_a"
9+
And the "session_data.xml" fixtures are loaded into workspace "default"
10+
And the node at "/tests_general_base" in "workspace_a" is cloned to "/foobar" in "default"
11+
12+
Scenario: Show the current nodes shared set
13+
Given the current node is "/tests_general_base"
14+
And I execute the "node:shared:show" command
15+
Then the command should not fai
16+
And I should see the following:
17+
"""
18+
workspace_a: /tests_general_base
19+
"""
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Feature: Display the path of any corresponding node in a given workspace
2+
In order to get the path of any corresponding node in a given workspace
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded
9+
10+
Scenario: Rename a node
11+
Given the current node is "/tests_general_base"
12+
And I execute the "node:corresponding default" command
13+
Then the command should not fail
14+
And I should see the following:
15+
"""
16+
/foobar
17+
"""
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Feature: Update the current node from the node to which it corresponds in the given workspace
2+
In order to update the current node from the node to which it corresponds in the given workspace
3+
As a user that is logged into the shell
4+
I need to be able to do that
5+
6+
Background:
7+
Given that I am logged in as "testuser"
8+
And the "session_data.xml" fixtures are loaded
9+
10+
Scenario: Rename a node
11+
Given the current node is "/tests_general_base"
12+
And I execute the "node:update default" command
13+
Then the command should not fail
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Feature: List the capabilities of the current repository
2+
In order to show the capabilities of the current repository
3+
As a logged in user
4+
I want to be able to execute a command which lists the repository descriptors
5+
6+
Scenario: Listing the capabilities
7+
Given that I am logged in as "testuser"
8+
And I execute the "repository:capability:list" command
9+
Then the command should not fail
10+
And I should see a table containing the following rows:
11+
| Key | Value |

src/PHPCR/Shell/Console/Application/ShellApplication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,8 @@ public function doRun(InputInterface $input, OutputInterface $output)
247247

248248
}
249249

250-
throw $e;
250+
$output->writeln('<error>' . $e->getMessage() . '</error>');
251+
return;
251252
}
252253

253254
return $exitCode;

0 commit comments

Comments
 (0)