Example #1
0
 public function attachTo(FileLibrary $filelib)
 {
     $this->backend = $filelib->getBackend();
 }
Example #2
0
 /**
  * @test
  */
 public function adaptersCanBeGivenLazily()
 {
     $storageAdapter = function () {
         return $this->getMockedStorageAdapter();
     };
     $backendAdapter = function () {
         return $this->getMockedBackendAdapter();
     };
     $filelib = new FileLibrary($storageAdapter, $backendAdapter);
     $this->assertInstanceOf('Xi\\Filelib\\Storage\\Storage', $filelib->getStorage());
     $this->assertInstanceOf('Xi\\Filelib\\Backend\\Backend', $filelib->getBackend());
 }