Exemplo n.º 1
0
 /**
  * Merges this unit with given one
  *
  * @throws \InvalidArgumentException
  *
  * @param UnitOfWork $other
  */
 public function merge(UnitOfWork $other)
 {
     if (!$this->uniqueId->equals($other->uniqueId)) {
         throw new \InvalidArgumentException('Cannot merge units with different UIDs');
     }
     $this->workload = new Workload(sprintf('%s%s', $this->getQuery(), $other->getQuery()));
 }
Exemplo n.º 2
0
 public function testEqualsReturnsFalseForDifferentUid()
 {
     static::assertFalse($this->uid->equals(new Uid('im-not-matching')));
 }