Skip to content

Commit 9ca701f

Browse files
committed
Fixing embedded mode
1 parent 38610d2 commit 9ca701f

File tree

81 files changed

+22
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+22
-11
lines changed

behat.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ default:
33
standalone:
44
contexts:
55
- PHPCR\Shell\Test\StandaloneContext
6+
paths:
7+
- features/all
8+
- features/standalone
9+
- features/shell
610
embedded:
11+
filter:
12+
tag: "~@standalone"
713
contexts:
814
- PHPCR\Shell\Test\EmbeddedContext
15+
paths:
16+
- features/all

features/phpcr_node_type_unregister.feature renamed to features/all/phpcr_node_type_unregister.feature

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,15 @@ Feature: Unregister a node type
33
As a user that is logged into the shell
44
I need to be able to do that
55

6+
# This is not currently implemented by Jackrabbit
7+
68
Background:
79
Given that I am logged in as "testuser"
810

911
Scenario: Unregister a node type
1012
Given the "example.cnd" node type is loaded
1113
And I execute the "node-type:unregister ns:NodeType" command
1214
Then the command should fail
13-
And I should see the following:
14-
"""
15-
NodeType not found
16-
"""
1715

1816
Scenario: Attempt to unregister a non-registered node type
1917
Given the "example.cnd" node type is loaded
File renamed without changes.

features/shell_alias.feature renamed to features/shell/shell_alias.feature

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ Feature: Command aliases
1818

1919
Examples:
2020
| command |
21-
| use default |
2221
| select * from [nt:unstructured] |
2322
| cd cms |
2423
| rm cms |
File renamed without changes.
File renamed without changes.

features/phpcr_session_login.feature renamed to features/standalone/phpcr_session_login.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
@standlone
12
Feature: Login to the session
23
In order to reconnect as a different user from a session
34
As a user logged into the shell

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

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public function init()
9797
}
9898

9999
$this->registerPhpcrCommands();
100+
$this->registerPhpcrStandaloneCommands();
100101
$this->registerShellCommands();
101102

102103
$event = new ApplicationInitEvent($this);
@@ -117,8 +118,6 @@ protected function registerPhpcrCommands()
117118
$this->add(new CommandPhpcr\SessionImpersonateCommand());
118119
$this->add(new CommandPhpcr\SessionImportXMLCommand());
119120
$this->add(new CommandPhpcr\SessionInfoCommand());
120-
$this->add(new CommandPhpcr\SessionLoginCommand());
121-
$this->add(new CommandPhpcr\SessionLogoutCommand());
122121
$this->add(new CommandPhpcr\SessionNamespaceListCommand());
123122
$this->add(new CommandPhpcr\SessionNamespaceSetCommand());
124123
$this->add(new CommandPhpcr\NodePropertyRemoveCommand());
@@ -134,16 +133,12 @@ protected function registerPhpcrCommands()
134133
$this->add(new CommandPhpcr\RetentionHoldRemoveCommand());
135134
$this->add(new CommandPhpcr\RetentionPolicyGetCommand());
136135
$this->add(new CommandPhpcr\RetentionPolicyRemoveCommand());
137-
$this->add(new CommandPhpcr\WorkspaceCreateCommand());
138-
$this->add(new CommandPhpcr\WorkspaceDeleteCommand());
139-
$this->add(new CommandPhpcr\WorkspaceListCommand());
140136
$this->add(new CommandPhpcr\NodeCloneCommand());
141137
$this->add(new CommandPhpcr\NodeCopyCommand());
142138
$this->add(new CommandPhpcr\NodeEditCommand());
143139
$this->add(new CommandPhpcr\WorkspaceNamespaceListCommand());
144140
$this->add(new CommandPhpcr\WorkspaceNamespaceRegisterCommand());
145141
$this->add(new CommandPhpcr\WorkspaceNamespaceUnregisterCommand());
146-
$this->add(new CommandPhpcr\WorkspaceUseCommand());
147142
$this->add(new CommandPhpcr\NodeTypeShowCommand());
148143
$this->add(new CommandPhpcr\NodeTypeEditCommand());
149144
$this->add(new CommandPhpcr\NodeTypeUnregisterCommand());
@@ -184,6 +179,16 @@ protected function registerPhpcrCommands()
184179
$this->add(new CommandPhpcr\LockUnlockCommand());
185180
}
186181

182+
protected function registerPhpcrStandaloneCommands()
183+
{
184+
$this->add(new CommandPhpcr\SessionLoginCommand());
185+
$this->add(new CommandPhpcr\SessionLogoutCommand());
186+
$this->add(new CommandPhpcr\WorkspaceUseCommand());
187+
$this->add(new CommandPhpcr\WorkspaceCreateCommand());
188+
$this->add(new CommandPhpcr\WorkspaceDeleteCommand());
189+
$this->add(new CommandPhpcr\WorkspaceListCommand());
190+
}
191+
187192
protected function registerShellCommands()
188193
{
189194
// add shell-specific commands

0 commit comments

Comments
 (0)