Skip to content

Commit 534925c

Browse files
committed
custom type for maps test
1 parent acf543b commit 534925c

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

tests/AnnotationTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function testBoolean()
4646
]);
4747
$this->assertNotNull($paycode->id);
4848
$this->assertTrue($paycode->active);
49-
49+
5050
$paycode = $mapper->create('paycode', [
5151
'active' => 0,
5252
]);
@@ -82,7 +82,7 @@ public function testInheritance()
8282
]);
8383

8484
$this->assertInstanceOf(Complex::class, $complex);
85-
85+
8686
$simple = $mapper->findOrFail('type', [
8787
'class' => Simple::class,
8888
]);
@@ -220,6 +220,9 @@ public function testTarantoolTypeHint()
220220
// property is not required
221221
$this->assertSame(true, $space->format[5]['is_nullable']);
222222

223+
// tarantool type hint for map
224+
$this->assertSame('map', $space->format[6]['type']);
225+
223226
$address = $mapper->create('address', []);
224227
$this->assertSame($address->street, "");
225228
$this->assertSame($address->house, 0);

tests/Entity/Address.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,10 @@ class Address extends Entity
3939
* @type integer
4040
*/
4141
public $flat;
42+
43+
/**
44+
* @var array
45+
* @type map
46+
*/
47+
public $map;
4248
}

0 commit comments

Comments
 (0)