__construct() public method

Creates a dumper for displaying values and sets the test message.
public __construct ( string $message = '%s' )
$message string Customised message on failure.
コード例 #1
0
ファイル: dom_tester.php プロジェクト: simpletest/simpletest
 /**
  * Sets the dom tree and the css selector to compare against
  *
  * @param mixed $dom          Dom tree to search into.
  * @param mixed $selector     Css selector to match element.
  * @param string $message     Customised message on failure.
  */
 public function __construct($dom, $selector, $message = '%s')
 {
     parent::__construct($message);
     $this->dom = $dom;
     $this->selector = $selector;
     $css_selector = new CssSelector($this->dom);
     $this->value = $css_selector->getTexts($this->selector);
 }
コード例 #2
0
 /**
  *    Sets the value to compare against.
  *    @param string $substring  Text to search for.
  *    @param string $message    Customised message on failure.
  *    @access public
  */
 function __construct($substring, $message = '%s')
 {
     parent::__construct($message);
     $this->_substring = $substring;
 }
コード例 #3
0
 public function __construct($repository_id)
 {
     parent::__construct();
     $this->repository_id = $repository_id;
 }
コード例 #4
0
 /**
  *    Sets up the conditions to test against.
  *    If the expected value is a string, then
  *    it will act as a test of the class name.
  *    An exception as the comparison will
  *    trigger an identical match. Writing this
  *    down now makes it look doubly dumb. I hope
  *    come up with a better scheme later.
  *    @param mixed $expected   A class name or an actual
  *                             exception to compare with.
  *    @param string $message   Message to display.
  */
 function __construct($expected, $message = '%s')
 {
     $this->expected = $expected;
     parent::__construct($message);
 }
コード例 #5
0
ファイル: mock_objects.php プロジェクト: Boris-de/videodb
 /**
  *    Stashes the method and expected count for later
  *    reporting.
  *    @param string $method    Name of method to confirm against.
  *    @param integer $count    Minimum number of calls.
  *    @param string $message   Custom error message.
  */
 function __construct($method, $count, $message = '%s')
 {
     $this->method = $method;
     $this->count = $count;
     parent::__construct($message);
 }
コード例 #6
0
 /**
  *    Sets the value to compare against.
  *    @param string $method     Method to check.
  *    @param string $message    Customised message on failure.
  *    @return void
  */
 function __construct($method, $message = '%s')
 {
     parent::__construct($message);
     $this->method =& $method;
 }
コード例 #7
0
 public function __construct(array $should_not_exist)
 {
     parent::__construct();
     $this->should_not_exist = $should_not_exist;
 }
コード例 #8
0
ファイル: bootstrap.php プロジェクト: pdaniel-frk/tuleap
 public function __construct($expected_cn)
 {
     parent::__construct();
     $this->expected = $expected_cn;
 }
コード例 #9
0
 /**
  * Creates a new IdenticalBinaryExpectation comparing with $left.
  * @param string $left    hand side of comparison
  * @param string $message for expecation
  */
 public function __construct($left, $message = '%s')
 {
     parent::__construct($message);
     $this->_left = $left;
 }
コード例 #10
0
 function __construct($expected, $message = '%s')
 {
     parent::__construct($message);
     if (!is_object($expected)) {
         trigger_error('Attempt to create a CheckSpecifiedFieldsExpectation ' . 'with an expected value that is not an object.');
     }
     $this->expect = $expected;
 }
コード例 #11
0
ファイル: XMLImportTest.php プロジェクト: blestab/tuleap
 public function __construct($expected_field_data)
 {
     parent::__construct();
     $this->expected_field_data = $expected_field_data;
 }
コード例 #12
0
 function __construct(array $expected)
 {
     parent::__construct();
     $this->expected = $expected;
 }