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 86896ef commit 05abfc3Copy full SHA for 05abfc3
1 file changed
tests/React/Promise/WhenLazyTest.php
@@ -0,0 +1,28 @@
1
+<?php
2
+
3
+namespace React\Promise;
4
5
+/**
6
+ * @group When
7
+ * @group WhenLazy
8
+ */
9
+class WhenLazyTest extends TestCase
10
+{
11
+ /** @test */
12
+ public function shouldReturnALazyPromise()
13
+ {
14
+ $this->assertInstanceOf('React\\Promise\\PromiseInterface', When::lazy(function () {}));
15
+ }
16
17
18
+ public function shouldCallFactoryIfThenIsInvoked()
19
20
+ $factory = $this->createCallableMock();
21
+ $factory
22
+ ->expects($this->once())
23
+ ->method('__invoke');
24
25
+ When::lazy($factory)
26
+ ->then();
27
28
+}
0 commit comments