本文整理汇总了PHP中SimpleExpectation::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SimpleExpectation::__construct方法的具体用法?PHP SimpleExpectation::__construct怎么用?PHP SimpleExpectation::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SimpleExpectation
的用法示例。
在下文中一共展示了SimpleExpectation::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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:
/**
* 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: __construct
public function __construct($repository_id)
{
parent::__construct();
$this->repository_id = $repository_id;
}
示例4:
/**
* 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:
/**
* 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:
/**
* 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: __construct
public function __construct(array $should_not_exist)
{
parent::__construct();
$this->should_not_exist = $should_not_exist;
}
示例8: __construct
public function __construct($expected_cn)
{
parent::__construct();
$this->expected = $expected_cn;
}
示例9: __construct
/**
* 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:
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: __construct
public function __construct($expected_field_data)
{
parent::__construct();
$this->expected_field_data = $expected_field_data;
}
示例12:
function __construct(array $expected)
{
parent::__construct();
$this->expected = $expected;
}