tests
[m6w6/ascertain] / lib / ascertain / Validator.php
diff --git a/lib/ascertain/Validator.php b/lib/ascertain/Validator.php
new file mode 100644 (file)
index 0000000..68eb9a7
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+
+namespace ascertain;
+
+/**
+ * Use this trait in an \ascertain\Testable class
+ */
+trait Validator {
+       /**
+        * @param string $e Exception class name
+        * @return \ascertain\Assert
+        */
+       function assert($e = "\\InvalidArgumentException") {
+               return new Assert($this, $e);
+       }
+}