Skip to content

Commit e1aff8c

Browse files
committed
Fixed node property set test
1 parent 4d826ef commit e1aff8c

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

features/node_set.feature renamed to features/node_property_set.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Feature: Set a node property
1717
Examples:
1818
| command | name | type |
1919
| node:property:set uri http://foobar | uri | http://foobar |
20-
| node:property:set double 12.12 | double | 12.12 |
20+
| node:property:set double 12.12 --type=double | double | 12.12 |
2121
| node:property:set long 123 | long | 123 |
2222
| node:property:set thisisnew foobar --type=string | /properties/thisisnew | foobar |
2323

src/PHPCR/Shell/Console/Command/Phpcr/NodePropertySetCommand.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,13 @@ public function execute(InputInterface $input, OutputInterface $output)
7676

7777
$intType = null;
7878

79-
error_log('TYPE: '. $type);
80-
error_log($value);
81-
8279
if ($type) {
8380
$intType = PropertyType::valueFromName($type);
8481
} else {
8582
$property = $node->getProperty($propName);
8683
$intType = $property->getType();
8784
}
8885

89-
if ($intType) {
90-
$node->setProperty($propName, $value, $intType);
91-
} else {
92-
$node->setProperty($propName, $value);
93-
}
86+
$node->setProperty($propName, $value);
9487
}
9588
}

0 commit comments

Comments
 (0)