Example #1
0
 public function testOptionsThroughSetter()
 {
     $imago = new Value('Piteå');
     $imago = new Repeater($imago);
     $imago->options()->set('repeat', 4);
     $this->assertSame(4, $imago->options()->get('repeat'));
     $this->assertSame('PiteåPiteåPiteåPiteå', $imago->get());
 }
Example #2
0
 public function testBatchdDelete()
 {
     $batch = new Context\BatchWrite();
     $batch->addKeyToDelete(getenv('DY_TABLE_RANGE'), getenv('ITEM_ID'), 997);
     $batch->addKeyToDelete(getenv('DY_TABLE_RANGE'), getenv('ITEM_ID'), 996);
     $batch->addKeyToDelete(getenv('DY_TABLE_RANGE'), getenv('ITEM_ID'), 995);
     $batch->addKeyToDelete(getenv('DY_TABLE_RANGE'), getenv('ITEM_ID'), 994);
     $repeater = new Repeater($this->conn);
     $repeater->BatchWrite($batch);
 }
Example #3
0
 /**
  * @expectedException RuntimeException
  */
 public function testExceptionArePropagatedAtTheEnd()
 {
     $r = new Repeater(3);
     $times = 0;
     $ok = false;
     $ret = $r->until(function ($context) use(&$times, &$ok) {
         throw new \RuntimeException("OK");
     });
 }