Beispiel #1
0
 /**
  * @return LockConfigInterface
  */
 public function getLock($package = null)
 {
     if (!array_key_exists($package, $this->lockCache)) {
         $path = $this->getWorkingDirectory($package) . DIRECTORY_SEPARATOR . 'resolver.lock';
         $this->lockCache[$package] = $this->configLockReader->read($path);
     }
     return $this->lockCache[$package];
 }
 /**
  * @covers PixelPolishers\Resolver\Config\Lock\Reader\AbstractReader::parseData
  * @covers PixelPolishers\Resolver\Config\Lock\Reader\AbstractReader::parseConstraints
  */
 public function testParseConstraints()
 {
     // Arrange
     $reader = new Json();
     // Act
     $constraints = $reader->read(__DIR__ . '/../../../../ResolverTestAsset/valid-lock.json')->getConstraints();
     // Assert
     $this->assertCount(1, $constraints);
 }