public function checkFileContent($file, $partialContent, $expectMatch)
    {
        $regexp = "/" . preg_quote($partialContent, "/") . "/";
        $this->inCurrentDir(function() use ($file, $regexp, $expectMatch) {
            $contents = file_get_contents($file);

            $match = preg_match($regexp, $contents);

            if ($expectMatch && !$match) {
                throw new ExpectationException("Could not match $match to $contents");
            }

            if ($match && !$expectMatch) {
                throw new ExpectationException("Matched $match to $contents");
            }
        });
    }