File tree Expand file tree Collapse file tree 6 files changed +19
-35
lines changed Expand file tree Collapse file tree 6 files changed +19
-35
lines changed Original file line number Diff line number Diff line change 13
13
use WikibaseSolutions \CypherDSL \Expressions \Operators \Inequality ;
14
14
use WikibaseSolutions \CypherDSL \Expressions \Property ;
15
15
use WikibaseSolutions \CypherDSL \Expressions \Variable ;
16
+ use WikibaseSolutions \CypherDSL \Types \PropertyTypes \BooleanType ;
16
17
17
18
/**
18
19
* @covers \WikibaseSolutions\CypherDSL\Expressions\Operators\Inequality
@@ -40,4 +41,11 @@ public function testToQueryNoParentheses(): void
40
41
41
42
$ this ->assertSame ("(v.a <> v.b <> v.a <> v.b) " , $ inequality ->toQuery ());
42
43
}
44
+
45
+ public function testInstanceOfBooleanType (): void
46
+ {
47
+ $ inequality = new Inequality (new Variable ('a ' ), new Variable ('b ' ));
48
+
49
+ $ this ->assertInstanceOf (BooleanType::class, $ inequality );
50
+ }
43
51
}
Original file line number Diff line number Diff line change 15
15
use WikibaseSolutions \CypherDSL \Expressions \Operators \In ;
16
16
use WikibaseSolutions \CypherDSL \Expressions \Property ;
17
17
use WikibaseSolutions \CypherDSL \Expressions \Variable ;
18
+ use WikibaseSolutions \CypherDSL \Types \CompositeTypes \ListType ;
19
+ use WikibaseSolutions \CypherDSL \Types \PropertyTypes \PropertyType ;
18
20
19
21
/**
20
22
* @covers \WikibaseSolutions\CypherDSL\Traits\TypeTraits\CompositeTypeTraits\ListTypeTrait
21
23
*/
22
24
final class ListTypeTraitTest extends TestCase
23
25
{
24
- /**
25
- * @var MockObject|PropertyType
26
- */
27
- private $ a ;
28
-
29
- /**
30
- * @var ListType|MockObject
31
- */
32
- private $ b ;
26
+ private PropertyType $ a ;
27
+ private ListType $ list ;
33
28
34
29
protected function setUp (): void
35
30
{
36
31
$ this ->a = new Property (new Variable ('foo ' ), 'bar ' );
37
- $ this ->b = new List_ ;
32
+ $ this ->list = new List_ ;
38
33
}
39
34
40
35
public function testHas (): void
41
36
{
42
- $ has = $ this ->b ->has ($ this ->a );
37
+ $ has = $ this ->list ->has ($ this ->a );
43
38
44
39
$ this ->assertInstanceOf (In::class, $ has );
45
40
}
Original file line number Diff line number Diff line change 20
20
*/
21
21
final class PropertyMethodTraitTest extends TestCase
22
22
{
23
- /**
24
- * @var MapType|MockObject
25
- */
26
- private $ a ;
23
+ private MapType $ a ;
27
24
28
25
protected function setUp (): void
29
26
{
Original file line number Diff line number Diff line change 9
9
*/
10
10
namespace WikibaseSolutions \CypherDSL \Tests \Unit \Traits \TypeTraits \PropertyTypeTraits ;
11
11
12
- use PHPUnit \Framework \MockObject \MockObject ;
13
12
use PHPUnit \Framework \TestCase ;
14
13
use WikibaseSolutions \CypherDSL \Expressions \Literals \Boolean ;
15
14
use WikibaseSolutions \CypherDSL \Expressions \Operators \Conjunction ;
24
23
*/
25
24
final class BooleanTypeTraitTest extends TestCase
26
25
{
27
- /**
28
- * @var BooleanType|MockObject
29
- */
30
- private $ a ;
31
-
32
- /**
33
- * @var BooleanType|MockObject
34
- */
35
- private $ b ;
26
+ private BooleanType $ a ;
27
+ private BooleanType $ b ;
36
28
37
29
protected function setUp (): void
38
30
{
Original file line number Diff line number Diff line change 23
23
final class PropertyTypeTraitTest extends TestCase
24
24
{
25
25
private PropertyType $ a ;
26
- private Property $ b ;
27
26
private List_ $ list ;
28
27
29
28
protected function setUp (): void
Original file line number Diff line number Diff line change 24
24
*/
25
25
final class StringTypeTraitTest extends TestCase
26
26
{
27
- /**
28
- * @var MockObject|StringType
29
- */
30
- private $ a ;
31
-
32
- /**
33
- * @var MockObject|StringType
34
- */
35
- private $ b ;
27
+ private StringType $ a ;
28
+ private StringType $ b ;
36
29
37
30
protected function setUp (): void
38
31
{
You can’t perform that action at this time.
0 commit comments