Skip to content

Commit 218ff41

Browse files
committed
Fixed exception use
1 parent 2829b4e commit 218ff41

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

features/all/phpcr_query_update.feature

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,16 @@ Feature: Execute a a raw UPDATE query in JCR_SQL2
140140
And the node at "/cms/articles/article1" should have the mixin "mix:mimeType"
141141
Then the node at "/cms/articles/article1" should have the mixin "mix:lockable"
142142

143+
Scenario Outline: Execute an invalid query
144+
Given I execute the "<query>" command
145+
Then the command should fail
146+
And I should see the following:
147+
"""
148+
InvalidQueryException
149+
"""
150+
Examples:
151+
| query |
152+
| UPDATE foo FOR fi |
153+
| UPDATE [nt:unstructured] mixin_foo('bar') |
154+
| UPDATE [nt:unstructured] APPLY mixin_foo('bar') |
155+
| UPDATE [nt:unstructured] mixin_foo'bar') |

src/PHPCR/Shell/Query/FunctionOperand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PHPCR\Shell\Query;
44

55
use PHPCR\Query\RowInterface;
6+
use PHPCR\Query\InvalidQueryException;
67

78
/**
89
* Simple class to represent function operands in query

0 commit comments

Comments
 (0)