public function loadWithName(string $legacyName)
    {
        $filename = $this->getLegacyFullPath($legacyName);

        $this->log('Reading Legacy "%s" from file "%s"', $legacyName, $filename);

        $data = @file_get_contents($filename);
        if ($data === false) {
            throw new LegacyException('Cannot read Legacy file ' . $filename);
        }

        $legacy = unserialize($data);
        if ($legacy === false) {
            throw new LegacyException('Cannot parse Legacy from file ' . $filename);
        }

        $this->debug('Legacy data: %s', $this->getPrintableValue($legacy));

        return $legacy;
    }
public function loadWithName(string $legacyName)
    {
        $filename = $this->getLegacyFullPath($legacyName);

        $this->log('Reading Legacy "%s" from file "%s"', $legacyName, $filename);

        $data = @file_get_contents($filename);
        if ($data === false) {
            throw new LegacyException('Cannot read Legacy file ' . $filename);
        }

        $legacy = unserialize($data);
        if ($legacy === false) {
            throw new LegacyException('Cannot parse Legacy from file ' . $filename);
        }

        $this->debug('Legacy data: %s', $this->getPrintableValue($legacy));

        return $legacy;
    }
public function loadWithName ( string $ legacyName ) { $ filename = $ this -> getLegacyFullPath ( $ legacyName ) ; $ this -> log ( 'Reading Legacy "%s" from file "%s"' , $ legacyName , $ filename ) ; $ data = @ file_get_contents ( $ filename ) ; if ( $ data === false ) { throw new LegacyException ( 'Cannot read Legacy file ' . $ filename ) ; } $ legacy = unserialize ( $ data ) ; if ( $ legacy === false ) { throw new LegacyException ( 'Cannot parse Legacy from file ' . $ filename ) ; } $ this -> debug ( 'Legacy data: %s' , $ this -> getPrintableValue ( $ legacy ) ) ; return $ legacy ; }
Reads legacy specified by custom name.
Raises exception if it is not found.

@param string $legacyName filename to store the data from the test class name
@throws LegacyException
Reads legacy specified by custom name . Raises exception if it is not found .