Skip to content

Commit 289228a

Browse files
committed
expanded CreateClauseTest
1 parent d361548 commit 289228a

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

tests/Unit/Clauses/CreateClauseTest.php

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function testEmptyClause(): void
4343
$createClause = new CreateClause();
4444

4545
$this->assertSame("", $createClause->toQuery());
46+
$this->assertEquals([], $createClause->getPatterns());
4647
}
4748

4849
public function testSinglePattern(): void
@@ -53,6 +54,7 @@ public function testSinglePattern(): void
5354
$createClause->addPattern($pattern);
5455

5556
$this->assertSame("CREATE (a)", $createClause->toQuery());
57+
$this->assertEquals([$pattern], $createClause->getPatterns());
5658
}
5759

5860
public function testMultiplePatterns(): void
@@ -66,11 +68,9 @@ public function testMultiplePatterns(): void
6668
$createClause->addPattern($patternB);
6769

6870
$this->assertSame("CREATE (a), (b)", $createClause->toQuery());
71+
$this->assertEquals([$patternA, $patternB], $createClause->getPatterns());
6972
}
7073

71-
/**
72-
* @doesNotPerformAssertions
73-
*/
7474
public function testAcceptsNodeType(): void
7575
{
7676
$createClause = new CreateClause();
@@ -79,11 +79,10 @@ public function testAcceptsNodeType(): void
7979

8080
$createClause->addPattern($patternA);
8181
$createClause->toQuery();
82+
83+
$this->assertEquals([$patternA], $createClause->getPatterns());
8284
}
8385

84-
/**
85-
* @doesNotPerformAssertions
86-
*/
8786
public function testAcceptsPathType(): void
8887
{
8988
$createClause = new CreateClause();
@@ -92,11 +91,9 @@ public function testAcceptsPathType(): void
9291

9392
$createClause->addPattern($patternA);
9493
$createClause->toQuery();
94+
$this->assertEquals([$patternA], $createClause->getPatterns());
9595
}
9696

97-
/**
98-
* @doesNotPerformAssertions
99-
*/
10097
public function testAcceptsAssignment(): void
10198
{
10299
$createClause = new CreateClause();
@@ -105,6 +102,7 @@ public function testAcceptsAssignment(): void
105102

106103
$createClause->addPattern($patternA);
107104
$createClause->toQuery();
105+
$this->assertEquals([$patternA], $createClause->getPatterns());
108106
}
109107

110108
public function testDoesNotAcceptAnyType(): void

0 commit comments

Comments
 (0)