Commits

Thomas Weinert  committed 61ba1bf

Tested: Carica\Io\Deferred\Promise::progress

  • Participants
  • Parent commits a55fa57

Comments (0)

Files changed (1)

File tests/Io/Deferred/PromiseTest.php

       $this->assertInstanceOf('Carica\Io\Deferred\Promise', $filterPromise);
       $this->assertNotSame($filterPromise, $promise);
     }
+
+    /**
+     * @covers Carica\Io\Deferred\Promise::progress
+     */
+    public function testProgress() {
+      $function = function() {};
+      $defer = $this->getMock('Carica\Io\Deferred');
+      $defer
+        ->expects($this->once())
+        ->method('progress')
+        ->with($function)
+        ->will($this->returnSelf());
+
+      $promise = new Promise($defer);
+      $this->assertSame($promise, $promise->progress($function));
+    }
   }
 }