toString() 공개 메소드

Returns a string representation of the constraint.
public toString ( ) : string
리턴 string
예제 #1
0
 public function testConstraintFileExists()
 {
     $constraint = new PHPUnit_Framework_Constraint_FileExists();
     $this->assertFalse($constraint->evaluate('foo'));
     $this->assertEquals('file exists', $constraint->toString());
     try {
         $constraint->fail('foo', '');
     } catch (PHPUnit_Framework_ExpectationFailedException $e) {
         $this->assertEquals('Failed asserting that file "foo" exists.', $e->getDescription());
         return;
     }
     $this->fail();
 }