Esempio n. 1
0
 public function testSaveConfigFile()
 {
     $configFile = new ConfigFile('/path');
     $this->serializer->expects($this->once())->method('serializeConfigFile')->with($configFile)->willReturn('SERIALIZED');
     $this->backend->expects($this->once())->method('write')->with('/path', 'SERIALIZED');
     $this->storage->saveConfigFile($configFile);
 }
Esempio n. 2
0
 public function testSaveRootPackageFile()
 {
     $baseConfig = new Config();
     $packageFile = new RootPackageFile(null, '/path', $baseConfig);
     $this->serializer->expects($this->once())->method('serializeRootPackageFile')->with($packageFile)->willReturn('SERIALIZED');
     $this->backend->expects($this->once())->method('write')->with('/path', 'SERIALIZED');
     $this->storage->saveRootPackageFile($packageFile);
 }