From cf14306c2b3f82a81f8d56669a71633b4d4b5fce Mon Sep 17 00:00:00 2001 From: marvin-borner@live.com Date: Mon, 16 Apr 2018 21:09:05 +0200 Subject: Main merge to user management system - files are now at /main/public/ --- .../react/promise/tests/CancellationQueueTest.php | 100 --------------------- 1 file changed, 100 deletions(-) delete mode 100755 assets/php/vendor/react/promise/tests/CancellationQueueTest.php (limited to 'assets/php/vendor/react/promise/tests/CancellationQueueTest.php') diff --git a/assets/php/vendor/react/promise/tests/CancellationQueueTest.php b/assets/php/vendor/react/promise/tests/CancellationQueueTest.php deleted file mode 100755 index 32cedf4..0000000 --- a/assets/php/vendor/react/promise/tests/CancellationQueueTest.php +++ /dev/null @@ -1,100 +0,0 @@ -enqueue($p); - - $cancellationQueue(); - - $this->assertTrue($p->cancelCalled); - } - - /** @test */ - public function ignoresSimpleCancellable() - { - $p = new SimpleTestCancellable(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($p); - - $cancellationQueue(); - - $this->assertFalse($p->cancelCalled); - } - - /** @test */ - public function callsCancelOnPromisesEnqueuedBeforeStart() - { - $d1 = $this->getCancellableDeferred(); - $d2 = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($d1->promise()); - $cancellationQueue->enqueue($d2->promise()); - - $cancellationQueue(); - } - - /** @test */ - public function callsCancelOnPromisesEnqueuedAfterStart() - { - $d1 = $this->getCancellableDeferred(); - $d2 = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - - $cancellationQueue(); - - $cancellationQueue->enqueue($d2->promise()); - $cancellationQueue->enqueue($d1->promise()); - } - - /** @test */ - public function doesNotCallCancelTwiceWhenStartedTwice() - { - $d = $this->getCancellableDeferred(); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($d->promise()); - - $cancellationQueue(); - $cancellationQueue(); - } - - /** @test */ - public function rethrowsExceptionsThrownFromCancel() - { - $this->setExpectedException('\Exception', 'test'); - - $mock = $this - ->getMockBuilder('React\Promise\CancellablePromiseInterface') - ->getMock(); - $mock - ->expects($this->once()) - ->method('cancel') - ->will($this->throwException(new \Exception('test'))); - - $cancellationQueue = new CancellationQueue(); - $cancellationQueue->enqueue($mock); - - $cancellationQueue(); - } - - private function getCancellableDeferred() - { - $mock = $this->createCallableMock(); - $mock - ->expects($this->once()) - ->method('__invoke'); - - return new Deferred($mock); - } -} -- cgit v1.2.3