Skip to content

Commit 9caa511

Browse files
committed
test string primary keys
1 parent 15a2aaf commit 9caa511

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/MapperTest.php

+11
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ public function createMapper(
3434

3535
return $mapper;
3636
}
37+
public function testUpdateStringPrimaryKey()
38+
{
39+
$mapper = $this->createMapper();
40+
$userdata = $mapper->createSpace('userdata');
41+
$userdata->addProperty('key', 'string');
42+
$userdata->addProperty('value', 'string');
43+
44+
$name = $userdata->create(['key' => 'name', 'value' => 'nekufa']);
45+
$mapper->update('userdata', $name, ['value' => 'Dmitry Krokhin']);
46+
$this->assertSame($name->value, 'Dmitry Krokhin');
47+
}
3748

3849
public function testDefaults()
3950
{

0 commit comments

Comments
 (0)