We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21f76fc commit 1978f52Copy full SHA for 1978f52
src/Asserts/TraitAsserts.php
@@ -0,0 +1,18 @@
1
+<?php
2
+
3
+namespace Illuminated\Testing\Asserts;
4
5
+trait TraitAsserts
6
+{
7
+ protected function assertTraitUsed($class, $trait)
8
+ {
9
+ $message = "Failed asserting that class `{$class}` is using trait `{$trait}`.";
10
+ $this->assertContains($trait, class_uses($class), $message);
11
+ }
12
13
+ protected function assertTraitNotUsed($class, $trait)
14
15
+ $message = "Failed asserting that class `{$class}` is not using trait `{$trait}`.";
16
+ $this->assertNotContains($trait, class_uses($class), $message);
17
18
+}
0 commit comments