/**
  * @test
  */
 public function getVersionProviderShouldDelegateToProfile()
 {
     $vp = $this->getMockedVersionProvider();
     $file = File::create(array('profile' => 'meisterlus'));
     $version = Version::get('kloo');
     $profile = $this->getMockedFileProfile('meisterlus');
     $profile->expects($this->once())->method('getVersionProvider')->with($file, $version)->will($this->returnValue($vp));
     $this->manager->addProfile($profile);
     $ret = $this->manager->getVersionProvider($file, $version);
     $this->assertSame($vp, $ret);
 }
Beispiel #2
0
 /**
  * @param File $file
  * @param Version $version
  * @return string
  */
 private function retrieve(File $file, Version $version)
 {
     return $this->storage->retrieveVersion($this->profiles->getVersionProvider($file, $version)->getApplicableVersionable($file), $version);
 }
Beispiel #3
0
 /**
  * @param File $file
  * @param Version $version
  * @return VersionProvider
  */
 protected function getVersionProvider(File $file, Version $version)
 {
     return $this->profiles->getVersionProvider($file, $version);
 }