/**
  * @test
  */
 public function doesntThrowUpWhenRightClassIsExpected()
 {
     $filelib = new FileLibrary(new MemoryStorageAdapter(), new MemoryBackendAdapter());
     $resolvee = function () use($filelib) {
         $p = $this->getMockedPublisher();
         $p->expects($this->once())->method('attachTo')->with($filelib);
         return $p;
     };
     $resolver = new LazyReferenceResolver($resolvee, 'Xi\\Filelib\\Publisher\\Publisher');
     $resolver->attachTo($filelib);
     $resolver->resolve();
 }
Beispiel #2
0
 /**
  * @return StorageAdapter
  */
 private function getResolvedAdapter()
 {
     return $this->adapter->resolve();
 }
 /**
  * @return StorageAdapter
  */
 private function resolveActualAdapter()
 {
     return $this->actualAdapter->resolve();
 }