Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
marmichalski committed May 8, 2024
1 parent 2541826 commit f3826fe
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,14 @@ public function test_it_should_check_multiple_namespaces_in_or(): void
$haveNameMatching->evaluate($classDesc, $violations, $because);
self::assertNotEquals(0, $violations->count());
}

public function test_duplicate_namespaces_are_removed(): void
{
$expression = new ResideInOneOfTheseNamespaces('A', 'B', 'A', 'C', 'D', 'D');

self::assertSame(
'should reside in one of these namespaces: A, B, C, D because rave',
$expression->describe(ClassDescription::getBuilder('Marko')->build(), 'rave')->toString()
);
}
}

0 comments on commit f3826fe

Please sign in to comment.