Coduo\PHPMatcher\Matcher\Pattern\Expander\Count::getError PHP Method

getError() public method

public getError ( ) : string | null
return string | null
    public function getError()
    {
        return $this->error;
    }

Usage Example

Example #1
0
 /**
  * @dataProvider invalidCasesProvider
  */
 public function test_error_when_matching_fail($boundary, $value, $errorMessage)
 {
     $expander = new Count($boundary);
     $this->assertFalse($expander->match($value));
     $this->assertEquals($errorMessage, $expander->getError());
 }