SimpleExpectation::test PHP 메소드

test() 공개 메소드

Tests the expectation. True if correct.
public test ( mixed $compare ) : boolean
$compare mixed Comparison value.
리턴 boolean True if correct.
    public function test($compare)
    {
    }

Usage Example

예제 #1
0
파일: test_case.php 프로젝트: nuckey/moodle
 /**
  *    Runs an expectation directly, for extending the
  *    tests with new expectation classes.
  *    @param SimpleExpectation $expectation  Expectation subclass.
  *    @param mixed $compare               Value to compare.
  *    @param string $message                 Message to display.
  *    @return boolean                        True on pass
  *    @access public
  */
 function assert(&$expectation, $compare, $message = '%s') {
     if ($expectation->test($compare)) {
         return $this->pass(sprintf(
                 $message,
                 $expectation->overlayMessage($compare, $this->_reporter->getDumper())));
     } else {
         return $this->fail(sprintf(
                 $message,
                 $expectation->overlayMessage($compare, $this->_reporter->getDumper())));
     }
 }
All Usage Examples Of SimpleExpectation::test