public function is(LimeTesterInterface $expected)
 {
     // allow comparison with objects that implement __toString()
     if ($expected instanceof LimeTesterObject) {
         $expected->is($this);
     } else {
         parent::is($expected);
     }
 }
Пример #2
0
 public function isntSame(LimeTesterInterface $expected)
 {
     if (!$expected instanceof LimeTesterArray || $this->getType() !== $expected->getType()) {
         return;
     }
     for ($expected->rewind(), $this->rewind(); $expected->valid(); $expected->next(), $this->next()) {
         if (!$this->valid() || $this->key() !== $expected->key()) {
             return;
         }
         try {
             $this->current()->isntSame($expected->current());
         } catch (LimeAssertionFailedException $e) {
             throw new LimeAssertionFailedException($this->dumpExcerpt($this->key(), $e->getActual()), $expected->dumpExcerpt($expected->key(), $e->getExpected()));
         }
     }
 }