Skip to content

Commit a798e1c

Browse files
committed
added tests for null helper methods
1 parent 0f8bf2e commit a798e1c

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/Unit/Traits/PropertyTypeTraitTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
use WikibaseSolutions\CypherDSL\Equality;
2727
use WikibaseSolutions\CypherDSL\In;
2828
use WikibaseSolutions\CypherDSL\Inequality;
29+
use WikibaseSolutions\CypherDSL\IsNotNull;
30+
use WikibaseSolutions\CypherDSL\IsNull;
2931
use WikibaseSolutions\CypherDSL\Tests\Unit\TestHelper;
3032
use WikibaseSolutions\CypherDSL\Traits\PropertyTypeTrait;
3133
use WikibaseSolutions\CypherDSL\Types\CompositeTypes\ListType;
@@ -132,4 +134,22 @@ public function testInNoParentheses(): void
132134
$this->assertEquals($this->a, $in->getLeft());
133135
$this->assertEquals($this->list, $in->getRight());
134136
}
137+
138+
public function testIsNull(): void
139+
{
140+
$test = $this->a->isNull();
141+
142+
$this->assertInstanceOf(IsNull::class, $test);
143+
144+
$this->assertEquals($this->a, $test->getExpression());
145+
}
146+
147+
public function testIsNotNull(): void
148+
{
149+
$test = $this->a->isNotNull();
150+
151+
$this->assertInstanceOf(IsNotNull::class, $test);
152+
153+
$this->assertEquals($this->a, $test->getExpression());
154+
}
135155
}

0 commit comments

Comments
 (0)