public function saveWithName($data, string $legacyName): void
    {
        $filename = $this->getLegacyFullPath($legacyName);
        $this->log('Saving data as Legacy "%s" to file "%s"', $legacyName, $filename);
        $this->debug('Legacy data: %s', $this->getPrintableValue($data));

        if (@file_put_contents($filename, serialize($data)) === false) {
            throw new LegacyException('Cannot save Legacy to file ' . $filename);
        }
    }
public function saveWithName($data, string $legacyName): void
    {
        $filename = $this->getLegacyFullPath($legacyName);
        $this->log('Saving data as Legacy "%s" to file "%s"', $legacyName, $filename);
        $this->debug('Legacy data: %s', $this->getPrintableValue($data));

        if (@file_put_contents($filename, serialize($data)) === false) {
            throw new LegacyException('Cannot save Legacy to file ' . $filename);
        }
    }
public function saveWithName ( $ data , string $ legacyName ) : void { $ filename = $ this -> getLegacyFullPath ( $ legacyName ) ; $ this -> log ( 'Saving data as Legacy "%s" to file "%s"' , $ legacyName , $ filename ) ; $ this -> debug ( 'Legacy data: %s' , $ this -> getPrintableValue ( $ data ) ) ; if ( @ file_put_contents ( $ filename , serialize ( $ data ) ) === false ) { throw new LegacyException ( 'Cannot save Legacy to file ' . $ filename ) ; } }
Store legacy of test under a custom name

@param string $legacyName filename to store the data if null getLegacyFilename is called to generate filename
from the test class name
@throws LegacyException
Store legacy of test under a custom name