PHPUnit_Framework_Assert::stringEndsWith PHP Method

stringEndsWith() public static method

Returns a PHPUnit_Framework_Constraint_StringEndsWith matcher object.
public static stringEndsWith ( mixed $suffix ) : PHPUnit_Framework_Constraint_StringEndsWith
$suffix mixed
return PHPUnit_Framework_Constraint_StringEndsWith
    public static function stringEndsWith($suffix)
    {
        return new PHPUnit_Framework_Constraint_StringEndsWith($suffix);
    }

Usage Example

Esempio n. 1
0
 /**
  * @Then /^the console output should have lines ending in:$/
  */
 public function theConsoleOutputShouldHaveLinesEndingIn(PyStringNode $string)
 {
     $stdOutLines = explode(PHP_EOL, $this->lastBehatStdOut);
     $expectedLines = $string->getLines();
     \PHPUnit_Framework_Assert::assertCount(count($expectedLines), $stdOutLines);
     foreach ($stdOutLines as $idx => $stdOutLine) {
         $suffix = isset($expectedLines[$idx]) ? $expectedLines[$idx] : '(NONE)';
         $constraint = \PHPUnit_Framework_Assert::stringEndsWith($suffix);
         $constraint->evaluate($stdOutLine);
     }
 }
All Usage Examples Of PHPUnit_Framework_Assert::stringEndsWith
PHPUnit_Framework_Assert