public function fileShouldContain($path, PyStringNode $text)
    {
        $path = $this->workingDir . '/' . $path;
        PHPUnit_Framework_Assert::assertFileExists($path);

        $fileContent = trim(file_get_contents($path));
        // Normalize the line endings in the output
        if ("\n" !== PHP_EOL) {
            $fileContent = str_replace(PHP_EOL, "\n", $fileContent);
        }

        PHPUnit_Framework_Assert::assertEquals($this->getExpectedOutput($text), $fileContent);
    }
public function fileShouldContain($path, PyStringNode $text)
    {
        $path = $this->workingDir . '/' . $path;
        PHPUnit_Framework_Assert::assertFileExists($path);

        $fileContent = trim(file_get_contents($path));
        // Normalize the line endings in the output
        if ("\n" !== PHP_EOL) {
            $fileContent = str_replace(PHP_EOL, "\n", $fileContent);
        }

        PHPUnit_Framework_Assert::assertEquals($this->getExpectedOutput($text), $fileContent);
    }
public function fileShouldContain ( $ path , PyStringNode $ text ) { $ path = $ this -> workingDir . '/' . $ path ; PHPUnit_Framework_Assert :: assertFileExists ( $ path ) ; $ fileContent = trim ( file_get_contents ( $ path ) ) ; // Normalize the line endings in the output if ( "\n" !== PHP_EOL ) { $ fileContent = str_replace ( PHP_EOL , "\n" , $ fileContent ) ; } PHPUnit_Framework_Assert :: assertEquals ( $ this -> getExpectedOutput ( $ text ) , $ fileContent ) ; }
Checks whether specified file exists and contains specified string.

@Then /^"([^"]*)" file should contain:$/

@param   string       $path file path
@param   PyStringNode $text file content
Checks whether specified file exists and contains specified string .