Coverage.Mock.html revision f8e69dd9aa2f3f5ca69a9338dcd8556d52c9da83
<head>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h3>test <span class="subtitle">3.2.0</span></h3>
> Coverage.Mock
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<div class="summary description" property="yui:description">
Creates a new mock object.
</div>
<div class="section constructor details" rel="yui:constructor" resource="#constructor">
<h3 id="constructor">Constructor</h3>
<div class="content">
<div class="detail">
<code>
(
template
)
</code>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">template</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> (Optional) An object whose methods
should be stubbed out on the mock object. This object
is used as the prototype of the mock object so instanceof
works correctly.</span>
</dd>
</dl>
</div>
</div>
</div>
</div>
<div rel="yui:properties" resource="#properties">
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
<div class="" rel="yui:property" resource="#property_Any">
<h4><a name="property_Any" property="yui:name">Any</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts any value as valid.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_Boolean">
<h4><a name="property_Boolean" property="yui:name">Boolean</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts only Boolean values as valid.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_Function">
<h4><a name="property_Function" property="yui:name">Function</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts onlyfunctions as valid.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_Number">
<h4><a name="property_Number" property="yui:name">Number</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts only numeric values as valid.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_Object">
<h4><a name="property_Object" property="yui:name">Object</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts only non-null objects values as valid.
</div>
</div>
<hr />
</div>
<div class="" rel="yui:property" resource="#property_String">
<h4><a name="property_String" property="yui:name">String</a>
- <code>static <span property="yui:type">Function</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Mock argument validator that accepts only String values as valid.
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="" rel="yui:method" resource="#method_expect">
<h4>
<a name="method_expect">expect</a></h4>
<div class="detail" >
<code>
static
void
<strong property="yui:name">expect</strong>
(
mock
,
expectation
)
</code>
<div class="description" property="yui:description">
Assigns an expectation to a mock object. This is used to create
methods and properties on the mock object that are monitored for
calls and changes, respectively.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">mock</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> The object to add the expectation to.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">expectation</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> An object defining the expectation. For
a method, the keys "method" and "args" are required with
an optional "returns" key available. For properties, the keys
"property" and "value" are required.</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_verify">
<h4>
<a name="method_verify">verify</a></h4>
<div class="detail" >
<code>
static
void
<strong property="yui:name">verify</strong>
(
mock
)
</code>
<div class="description" property="yui:description">
Verifies that all expectations of a mock object have been met and
throws an assertion error if not.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">mock</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> The object to verify..</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
</div>
<div rel="yui:attributes" resource="#configattributes">
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
<li class=""><a href="module_event-valuechange.html" title="event-valuechange">event-valuechange</a></li>
<li class=""><a href="module_history-deprecated.html" title="history-deprecated">history-deprecated</a></li>
<li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
<li class=""><a href="module_scrollview-paginator.html" title="scrollview-paginator">scrollview-paginator</a></li>
<li class=""><a href="module_scrollview-scrollbars.html" title="scrollview-scrollbars">scrollview-scrollbars</a></li>
<li class=""><a href="module_widget-position-align.html" title="widget-position-align">widget-position-align</a></li>
<li class=""><a href="module_widget-position-constrain.html" title="widget-position-constrain">widget-position-constrain</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
<li class=""><a href="Assert.ComparisonFailure.html" title="Assert.ComparisonFailure">Assert.ComparisonFailure</a></li>
<li class=""><a href="Assert.ShouldError.html" title="Assert.ShouldError">Assert.ShouldError</a></li>
<li class=""><a href="Assert.UnexpectedError.html" title="Assert.UnexpectedError">Assert.UnexpectedError</a></li>
<li class=""><a href="Assert.UnexpectedValue.html" title="Assert.UnexpectedValue">Assert.UnexpectedValue</a></li>
<li class=""><a href="Coverage.DateAssert.html" title="Coverage.DateAssert">Coverage.DateAssert</a></li>
<li class=""><a href="Mock.Value.ObjectAssert.html" title="Mock.Value.ObjectAssert">Mock.Value.ObjectAssert</a></li>
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
</ul>
</div>
<div id="propertyList" class="module">
<h4>Properties</h4>
<ul class="content">
<li class=""><a href="#property_Any" title="Any">Any</a></li>
<li class=""><a href="#property_Boolean" title="Boolean">Boolean</a></li>
<li class=""><a href="#property_Function" title="Function">Function</a></li>
<li class=""><a href="#property_Number" title="Number">Number</a></li>
<li class=""><a href="#property_Object" title="Object">Object</a></li>
<li class=""><a href="#property_String" title="String">String</a></li>
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><a href="#method_expect" title="expect">expect</a></li>
<li class=""><a href="#method_verify" title="verify">verify</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2010 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
var ALL_YUI_PROPS = [{"access": "", "host": "Assert.ComparisonFailure", "name": "actual", "url": "Assert.ComparisonFailure.html#property_actual", "type": "property"}, {"access": "", "host": "Coverage.Mock", "name": "Any", "url": "Coverage.Mock.html#property_Any", "type": "property"}, {"access": "", "host": "Assert", "name": "areEqual", "url": "Assert.html#method_areEqual", "type": "method"}, {"access": "", "host": "Assert", "name": "areNotEqual", "url": "Assert.html#method_areNotEqual", "type": "method"}, {"access": "", "host": "Assert", "name": "areNotSame", "url": "Assert.html#method_areNotSame", "type": "method"}, {"access": "", "host": "Assert", "name": "areSame", "url": "Assert.html#method_areSame", "type": "method"}, {"access": "private", "host": "Assert", "name": "_asserts", "url": "Assert.html#property__asserts", "type": "property"}, {"access": "", "host": "Coverage.Mock", "name": "Boolean", "url": "Coverage.Mock.html#property_Boolean", "type": "property"}, {"access": "", "host": "Assert.UnexpectedError", "name": "cause", "url": "Assert.UnexpectedError.html#property_cause", "type": "property"}, {"access": "", "host": "ArrayAssert", "name": "contains", "url": "ArrayAssert.html#method_contains", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "containsItems", "url": "ArrayAssert.html#method_containsItems", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "containsMatch", "url": "ArrayAssert.html#method_containsMatch", "type": "method"}, {"access": "", "host": "Coverage.DateAssert", "name": "datesAreEqual", "url": "Coverage.DateAssert.html#method_datesAreEqual", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "doesNotContain", "url": "ArrayAssert.html#method_doesNotContain", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "doesNotContainItems", "url": "ArrayAssert.html#method_doesNotContainItems", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "doesNotContainMatch", "url": "ArrayAssert.html#method_doesNotContainMatch", "type": "method"}, {"access": "", "host": "Coverage.Mock", "name": "expect", "url": "Coverage.Mock.html#method_expect", "type": "method"}, {"access": "", "host": "Assert.ComparisonFailure", "name": "expected", "url": "Assert.ComparisonFailure.html#property_expected", "type": "property"}, {"access": "", "host": "Assert", "name": "fail", "url": "Assert.html#method_fail", "type": "method"}, {"access": "protected", "host": "Assert", "name": "_formatMessage", "url": "Assert.html#method__formatMessage", "type": "method"}, {"access": "", "host": "Coverage.Mock", "name": "Function", "url": "Coverage.Mock.html#property_Function", "type": "property"}, {"access": "protected", "host": "Assert", "name": "_getCount", "url": "Assert.html#method__getCount", "type": "method"}, {"access": "", "host": "Assert.Error", "name": "getMessage", "url": "Assert.Error.html#method_getMessage", "type": "method"}, {"access": "", "host": "Assert.UnexpectedValue", "name": "getMessage", "url": "Assert.UnexpectedValue.html#method_getMessage", "type": "method"}, {"access": "protected", "host": "Assert", "name": "_increment", "url": "Assert.html#method__increment", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "indexOf", "url": "ArrayAssert.html#method_indexOf", "type": "method"}, {"access": "", "host": "Assert", "name": "isArray", "url": "Assert.html#method_isArray", "type": "method"}, {"access": "", "host": "Assert", "name": "isBoolean", "url": "Assert.html#method_isBoolean", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "isEmpty", "url": "ArrayAssert.html#method_isEmpty", "type": "method"}, {"access": "", "host": "Assert", "name": "isFalse", "url": "Assert.html#method_isFalse", "type": "method"}, {"access": "", "host": "Assert", "name": "isFunction", "url": "Assert.html#method_isFunction", "type": "method"}, {"access": "", "host": "Assert", "name": "isInstanceOf", "url": "Assert.html#method_isInstanceOf", "type": "method"}, {"access": "", "host": "Assert", "name": "isNaN", "url": "Assert.html#method_isNaN", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "isNotEmpty", "url": "ArrayAssert.html#method_isNotEmpty", "type": "method"}, {"access": "", "host": "Assert", "name": "isNotNaN", "url": "Assert.html#method_isNotNaN", "type": "method"}, {"access": "", "host": "Assert", "name": "isNotNull", "url": "Assert.html#method_isNotNull", "type": "method"}, {"access": "", "host": "Assert", "name": "isNotUndefined", "url": "Assert.html#method_isNotUndefined", "type": "method"}, {"access": "", "host": "Assert", "name": "isNull", "url": "Assert.html#method_isNull", "type": "method"}, {"access": "", "host": "Assert", "name": "isNumber", "url": "Assert.html#method_isNumber", "type": "method"}, {"access": "", "host": "Assert", "name": "isObject", "url": "Assert.html#method_isObject", "type": "method"}, {"access": "", "host": "Assert", "name": "isString", "url": "Assert.html#method_isString", "type": "method"}, {"access": "", "host": "Assert", "name": "isTrue", "url": "Assert.html#method_isTrue", "type": "method"}, {"access": "", "host": "Assert", "name": "isTypeOf", "url": "Assert.html#method_isTypeOf", "type": "method"}, {"access": "", "host": "Assert", "name": "isUndefined", "url": "Assert.html#method_isUndefined", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "itemsAreEqual", "url": "ArrayAssert.html#method_itemsAreEqual", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "itemsAreEquivalent", "url": "ArrayAssert.html#method_itemsAreEquivalent", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "itemsAreSame", "url": "ArrayAssert.html#method_itemsAreSame", "type": "method"}, {"access": "", "host": "Coverage.Format", "name": "JSON", "url": "Coverage.Format.html#method_JSON", "type": "method"}, {"access": "", "host": "ArrayAssert", "name": "lastIndexOf", "url": "ArrayAssert.html#method_lastIndexOf", "type": "method"}, {"access": "", "host": "Assert.Error", "name": "name", "url": "Assert.Error.html#property_name", "type": "property"}, {"access": "", "host": "Assert.ComparisonFailure", "name": "name", "url": "Assert.ComparisonFailure.html#property_name", "type": "property"}, {"access": "", "host": "Assert.UnexpectedValue", "name": "name", "url": "Assert.UnexpectedValue.html#property_name", "type": "property"}, {"access": "", "host": "Assert.ShouldFail", "name": "name", "url": "Assert.ShouldFail.html#property_name", "type": "property"}, {"access": "", "host": "Assert.ShouldError", "name": "name", "url": "Assert.ShouldError.html#property_name", "type": "property"}, {"access": "", "host": "Assert.UnexpectedError", "name": "name", "url": "Assert.UnexpectedError.html#property_name", "type": "property"}, {"access": "", "host": "Coverage.Mock", "name": "Number", "url": "Coverage.Mock.html#property_Number", "type": "property"}, {"access": "", "host": "Coverage.Mock", "name": "Object", "url": "Coverage.Mock.html#property_Object", "type": "property"}, {"access": "protected", "host": "Assert", "name": "_reset", "url": "Assert.html#method__reset", "type": "method"}, {"access": "", "host": "Assert.UnexpectedError", "name": "stack", "url": "Assert.UnexpectedError.html#property_stack", "type": "property"}, {"access": "", "host": "Coverage.Mock", "name": "String", "url": "Coverage.Mock.html#property_String", "type": "property"}, {"access": "", "host": "Coverage.DateAssert", "name": "timesAreEqual", "url": "Coverage.DateAssert.html#method_timesAreEqual", "type": "method"}, {"access": "", "host": "Assert.Error", "name": "toString", "url": "Assert.Error.html#method_toString", "type": "method"}, {"access": "", "host": "Assert.ComparisonFailure", "name": "toString", "url": "Assert.ComparisonFailure.html#method_toString", "type": "method"}, {"access": "", "host": "Assert.UnexpectedValue", "name": "unexpected", "url": "Assert.UnexpectedValue.html#property_unexpected", "type": "property"}, {"access": "", "host": "Assert.Error", "name": "valueOf", "url": "Assert.Error.html#method_valueOf", "type": "method"}, {"access": "", "host": "Coverage.Mock", "name": "verify", "url": "Coverage.Mock.html#method_verify", "type": "method"}, {"access": "", "host": "Coverage.Format", "name": "XdebugJSON", "url": "Coverage.Format.html#method_XdebugJSON", "type": "method"}, {"access": "", "host": "Assert", "name": "Y.assert", "url": "Assert.html#method_Y.assert", "type": "method"}, {"access": "", "host": "Assert", "name": "Y.fail", "url": "Assert.html#method_Y.fail", "type": "method"}];
</script>
</body>
</html>