|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* This file is part of the tarantool/client package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Eugene Leonovich <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
declare(strict_types=1); |
|
13
|
|
|
|
|
14
|
|
|
namespace Tarantool\Client\Tests\Integration; |
|
15
|
|
|
|
|
16
|
|
|
use Tarantool\Client\Schema\Criteria; |
|
17
|
|
|
|
|
18
|
|
|
final class BoxNullTest extends TestCase |
|
19
|
|
|
{ |
|
20
|
|
|
/** |
|
21
|
|
|
* @lua format = {} |
|
22
|
|
|
* @lua format[1] = {name = 'foo', type = 'unsigned'} |
|
23
|
|
|
* @lua format[2] = {name = 'bar', type = 'map', is_nullable = true} |
|
24
|
|
|
* @lua format[3] = {name = 'baz', type = 'unsigned', is_nullable = true} |
|
25
|
|
|
* @lua space = create_space('box_null', {format = format}) |
|
26
|
|
|
* @lua space:create_index('pk') |
|
27
|
|
|
* @lua space:insert{1, {a = 1}} |
|
28
|
|
|
* @lua space:insert{2, {b = 2}, box.NULL} |
|
29
|
|
|
* @lua space:insert{3, box.NULL, 300} |
|
30
|
|
|
*/ |
|
31
|
|
|
public function testNull() : void |
|
32
|
|
|
{ |
|
33
|
|
|
$space = $this->client->getSpace('box_null'); |
|
|
|
|
|
|
34
|
|
|
|
|
35
|
|
|
$space->insert([4, ['d' => 4], 400]); |
|
36
|
|
|
$space->insert([5, null, 500]); |
|
37
|
|
|
$space->insert([6, ['f' => 6], null]); |
|
38
|
|
|
$space->insert([7, []]); |
|
39
|
|
|
$space->insert([8, [], 800]); |
|
40
|
|
|
$space->insert([9]); |
|
41
|
|
|
|
|
42
|
|
|
self::assertSame([ |
|
43
|
|
|
[1, ['a' => 1]], |
|
44
|
|
|
[2, ['b' => 2], null], |
|
45
|
|
|
[3, null, 300], |
|
46
|
|
|
[4, ['d' => 4], 400], |
|
47
|
|
|
[5, null, 500], |
|
48
|
|
|
[6, ['f' => 6], null], |
|
49
|
|
|
[7, []], |
|
50
|
|
|
[8, [], 800], |
|
51
|
|
|
[9], |
|
52
|
|
|
], $space->select(Criteria::key([]))); |
|
53
|
|
|
} |
|
54
|
|
|
} |
|
55
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.