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 fdb9010 commit 39e9acdCopy full SHA for 39e9acd
src/TestException.php
@@ -0,0 +1,17 @@
1
+<?php
2
+
3
+namespace Amp\PHPUnit;
4
5
+/**
6
+ * Generic exception to be used in cases where an exception should be thrown and caught, but if the exception is not
7
+ * thrown, the test should fail using $this->fail(...).
8
+ *
9
+ * try {
10
+ * functionCallThatShouldThrow();
11
+ * $this->fail("Expected functionCallThatShouldThrow() to throw.");
12
+ * } catch (TestException $e) {
13
+ * $this->assertSame($expectedExceptionInstance, $e);
14
+ * }
15
+ */
16
+class TestException extends \Exception {
17
+}
0 commit comments