You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by ch...@apache.org on 2008/08/02 16:11:44 UTC
svn commit: r681982 [25/27] - in /incubator/shindig/trunk/php: external/
external/PHPUnit/ external/PHPUnit/Extensions/
external/PHPUnit/Extensions/Database/
external/PHPUnit/Extensions/Database/Constraint/
external/PHPUnit/Extensions/Database/DB/ exte...
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/style.css
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/style.css?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/style.css (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/style.css Sat Aug 2 07:11:35 2008
@@ -0,0 +1,423 @@
+/* All views: initial background and text color */
+body
+{
+ background-color: #fff;
+ color: #2e3436;
+ font-family: arial, helvetica, sans-serif;
+ font-size: 12px;
+ margin: 0 auto;
+ width: 100%;
+}
+
+/* All views: standard link format*/
+a:link
+{
+ color: #2e3436;
+ text-decoration: underline;
+}
+
+/* All views: standard link - visited format */
+a:visited
+{
+ color: #2e3436;
+ text-decoration: underline;
+}
+
+/* All views: standard link - activated format */
+a:active
+{
+ color: #2e3436;
+ text-decoration: underline;
+}
+
+/* All views: main title format */
+td.title
+{
+ text-align: center;
+ padding: 10px;
+ font-family: sans-serif;
+ font-style: italic;
+ font-weight: bold;
+ font-size: 1.6em;
+}
+
+/* All views: header item format */
+td.headerItem
+{
+ text-align: right;
+ padding-right: 6px;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* All views: header item value format */
+td.headerValue
+{
+ text-align: left;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* All views: header legend item format */
+td.legendItem
+{
+ text-align: right;
+ padding-right: 6px;
+ padding-top: 10px;
+ padding-bottom: 2px;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* All views: header legend item value format */
+td.legendValue
+{
+ text-align: left;
+ padding-top: 10px;
+ padding-bottom: 2px;
+ color: #2e3436;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* All views: color of horizontal ruler */
+td.ruler
+{
+ background-color: #d3d7cf;
+}
+
+/* All views: version string format */
+td.versionInfo
+{
+ text-align: center;
+ padding-top: 2px;
+ font-family: sans-serif;
+ font-style: italic;
+}
+
+/* Directory view/File view (all)/Test case descriptions:
+table headline format */
+td.tableHead
+{
+ text-align: center;
+ color: #ffffff;
+ background-color: #555753;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* Directory view/File view (all): filename entry format */
+td.coverFile
+{
+ text-align: left;
+ padding-left: 10px;
+ padding-right: 20px;
+ background-color: #d3d7cf;
+ font-family: monospace;
+}
+
+/* Directory view/File view (all): bar-graph entry format*/
+td.coverBar
+{
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #d3d7cf;
+}
+
+/* Directory view/File view (all): bar-graph outline color */
+td.coverBarOutline
+{
+ background-color: #2e3436;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+high coverage rate */
+td.coverPerHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #8ae234;
+ font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+high coverage rate */
+td.coverNumHi
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #8ae234;
+ white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for high coverage
+rate */
+span.coverLegendHi
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #8ae234;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+medium coverage rate */
+td.coverPerMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #fce94f;
+ font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+medium coverage rate */
+td.coverNumMed
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #fce94f;
+ white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for medium coverage
+rate */
+span.coverLegendMed
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-top: 5px;
+ margin-bottom: 5px;
+ margin-right: 2px;
+ background-color: #fce94f;
+}
+
+/* Directory view/File view (all): percentage entry for files with
+low coverage rate */
+td.coverPerLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #f57900;
+ font-weight: bold;
+}
+
+/* Directory view/File view (all): line count entry for files with
+low coverage rate */
+td.coverNumLo
+{
+ text-align: right;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #f57900;
+ white-space: nowrap;
+}
+
+/* Directory view/File view (all): legend entry for low coverage
+rate */
+span.coverLegendLo
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-right: 2px;
+ background-color: #f57900;
+}
+
+/* File view (all): "show/hide details" link format */
+a.detail:link
+{
+ color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - visited format */
+a.detail:visited
+{
+ color: #ffffff;
+}
+
+/* File view (all): "show/hide details" link - activated format */
+a.detail:active
+{
+ color: #ffffff;
+}
+
+/* File view (detail): test name table headline format */
+td.testNameHead
+{
+ text-align: left;
+ padding-left: 10px;
+ background-color: #729fcf;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* File view (detail): test lines table headline format */
+td.testLinesHead
+{
+ text-align: center;
+ background-color: #729fcf;
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* File view (detail): test name entry */
+td.testName
+{
+ text-align: left;
+ padding-left: 10px;
+ background-color: #729fcf;
+}
+
+/* File view (detail): test percentage entry */
+td.testPer
+{
+ text-align: right;
+ vertical-align: top;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #729fcf;
+}
+
+/* File view (detail): test lines count entry */
+td.testNum
+{
+ text-align: right;
+ vertical-align: top;
+ padding-left: 10px;
+ padding-right: 10px;
+ background-color: #729fcf;
+ white-space: nowrap;
+}
+
+/* Test case descriptions: test name format*/
+dt
+{
+ font-family: sans-serif;
+ font-weight: bold;
+}
+
+/* Test case descriptions: description table body */
+td.testDescription
+{
+ padding-top: 10px;
+ padding-left: 30px;
+ padding-bottom: 10px;
+ padding-right: 30px;
+ background-color: #729fcf;
+}
+
+/* Source code view: source code format */
+pre.source
+{
+ font-family: monospace;
+ white-space: pre;
+}
+
+/* Source code view: line number format */
+span.lineNum
+{
+ background-color: #d3d7cf;
+}
+
+span.lineNum a {
+ text-decoration: none;
+}
+
+/* Source code view: format for lines which were executed */
+span.lineCov
+{
+ background-color: #8ae234;
+}
+
+/* Source code view: format for Cov legend */
+span.LegendCov
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-right: 2px;
+ background-color: #8ae234;
+}
+
+/* Source code view: format for lines which were not executed */
+span.lineNoCov
+{
+ background-color: #f57900;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendNoCov
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-right: 2px;
+ background-color: #f57900;
+}
+
+/* Source code view: format for lines which are dead code */
+span.lineDeadCode
+{
+ background-color: #d3d7cf;
+}
+
+/* Source code view: format for NoCov legend */
+span.LegendDeadCode
+{
+ text-align: center;
+ padding-left: 10px;
+ padding-right: 10px;
+ margin-right: 2px;
+ background-color: #d3d7cf;
+}
+
+/* Test view: format for tests which have passed */
+li.testPassed
+{
+}
+
+/* Test view: format for tests which failed */
+li.testFailure
+{
+ background-color: #f57900;
+}
+
+/* Test view: format for tests which failed with an error */
+li.testError
+{
+ background-color: #f57900;
+}
+
+/* Test view: format for incomplete and skipped tests */
+li.testIncomplete
+{
+ background-color: #fcaf3e;
+}
+
+pre span.comment {
+ color: #888a85;
+}
+
+pre span.default {
+ color: #2e3436;
+}
+
+pre span.html {
+ color: #888a85;
+}
+
+pre span.keyword {
+ color: #2e3436;
+ font-weight: bold;
+}
+
+pre span.string {
+ color: #2e3436;
+}
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yahoo-dom-event.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yahoo-dom-event.js?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yahoo-dom-event.js (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yahoo-dom-event.js Sat Aug 2 07:11:35 2008
@@ -0,0 +1 @@
+if(typeof YAHOO=="undefined"){var YAHOO={};}YAHOO.namespace=function(){var A=arguments,E=null,C,B,D;for(C=0;C<A.length;C=C+1){D=A[C].split(".");E=YAHOO;for(B=(D[0]=="YAHOO")?1:0;B<D.length;B=B+1){E[D[B]]=E[D[B]]||{};E=E[D[B]];}}return E;};YAHOO.log=function(D,A,C){var B=YAHOO.widget.Logger;if(B&&B.log){return B.log(D,A,C);}else{return false;}};YAHOO.register=function(A,E,D){var I=YAHOO.env.modules;if(!I[A]){I[A]={versions:[],builds:[]};}var B=I[A],H=D.version,G=D.build,F=YAHOO.env.listeners;B.name=A;B.version=H;B.build=G;B.versions.push(H);B.builds.push(G);B.mainClass=E;for(var C=0;C<F.length;C=C+1){F[C](B);}if(E){E.VERSION=H;E.BUILD=G;}else{YAHOO.log("mainClass is undefined for module "+A,"warn");}};YAHOO.env=YAHOO.env||{modules:[],listeners:[]};YAHOO.env.getVersion=function(A){return YAHOO.env.modules[A]||null;};YAHOO.env.ua=function(){var C={ie:0,opera:0,gecko:0,webkit:0};var B=navigator.userAgent,A;if((/KHTML/).test(B)){C.webkit=1;}A=B.match(/AppleWebKit\/([^\s]*)/);if(A
&&A[1]){C.webkit=parseFloat(A[1]);}if(!C.webkit){A=B.match(/Opera[\s\/]([^\s]*)/);if(A&&A[1]){C.opera=parseFloat(A[1]);}else{A=B.match(/MSIE\s([^;]*)/);if(A&&A[1]){C.ie=parseFloat(A[1]);}else{A=B.match(/Gecko\/([^\s]*)/);if(A){C.gecko=1;A=B.match(/rv:([^\s\)]*)/);if(A&&A[1]){C.gecko=parseFloat(A[1]);}}}}}return C;}();(function(){YAHOO.namespace("util","widget","example");if("undefined"!==typeof YAHOO_config){var B=YAHOO_config.listener,A=YAHOO.env.listeners,D=true,C;if(B){for(C=0;C<A.length;C=C+1){if(A[C]==B){D=false;break;}}if(D){A.push(B);}}}})();YAHOO.lang={isArray:function(B){if(B){var A=YAHOO.lang;return A.isNumber(B.length)&&A.isFunction(B.splice)&&!A.hasOwnProperty(B.length);}return false;},isBoolean:function(A){return typeof A==="boolean";},isFunction:function(A){return typeof A==="function";},isNull:function(A){return A===null;},isNumber:function(A){return typeof A==="number"&&isFinite(A);},isObject:function(A){return(A&&(typeof A==="object"||YAHOO.lang.isFunction(A
)))||false;},isString:function(A){return typeof A==="string";},isUndefined:function(A){return typeof A==="undefined";},hasOwnProperty:function(A,B){if(Object.prototype.hasOwnProperty){return A.hasOwnProperty(B);}return!YAHOO.lang.isUndefined(A[B])&&A.constructor.prototype[B]!==A[B];},_IEEnumFix:function(C,B){if(YAHOO.env.ua.ie){var E=["toString","valueOf"],A;for(A=0;A<E.length;A=A+1){var F=E[A],D=B[F];if(YAHOO.lang.isFunction(D)&&D!=Object.prototype[F]){C[F]=D;}}}},extend:function(D,E,C){if(!E||!D){throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");}var B=function(){};B.prototype=E.prototype;D.prototype=new B();D.prototype.constructor=D;D.superclass=E.prototype;if(E.prototype.constructor==Object.prototype.constructor){E.prototype.constructor=E;}if(C){for(var A in C){D.prototype[A]=C[A];}YAHOO.lang._IEEnumFix(D.prototype,C);}},augmentObject:function(E,D){if(!D||!E){throw new Error("Absorb failed, verify dependencies.");}var A=argumen
ts,C,F,B=A[2];if(B&&B!==true){for(C=2;C<A.length;C=C+1){E[A[C]]=D[A[C]];}}else{for(F in D){if(B||!E[F]){E[F]=D[F];}}YAHOO.lang._IEEnumFix(E,D);}},augmentProto:function(D,C){if(!C||!D){throw new Error("Augment failed, verify dependencies.");}var A=[D.prototype,C.prototype];for(var B=2;B<arguments.length;B=B+1){A.push(arguments[B]);}YAHOO.lang.augmentObject.apply(this,A);},dump:function(A,G){var C=YAHOO.lang,D,F,I=[],J="{...}",B="f(){...}",H=", ",E=" => ";if(!C.isObject(A)){return A+"";}else{if(A instanceof Date||("nodeType" in A&&"tagName" in A)){return A;}else{if(C.isFunction(A)){return B;}}}G=(C.isNumber(G))?G:3;if(C.isArray(A)){I.push("[");for(D=0,F=A.length;D<F;D=D+1){if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}if(I.length>1){I.pop();}I.push("]");}else{I.push("{");for(D in A){if(C.hasOwnProperty(A,D)){I.push(D+E);if(C.isObject(A[D])){I.push((G>0)?C.dump(A[D],G-1):J);}else{I.push(A[D]);}I.push(H);}}if(I.length>1){I.pop();}I.push("}"
);}return I.join("");},substitute:function(Q,B,J){var G,F,E,M,N,P,D=YAHOO.lang,L=[],C,H="dump",K=" ",A="{",O="}";for(;;){G=Q.lastIndexOf(A);if(G<0){break;}F=Q.indexOf(O,G);if(G+1>=F){break;}C=Q.substring(G+1,F);M=C;P=null;E=M.indexOf(K);if(E>-1){P=M.substring(E+1);M=M.substring(0,E);}N=B[M];if(J){N=J(M,N,P);}if(D.isObject(N)){if(D.isArray(N)){N=D.dump(N,parseInt(P,10));}else{P=P||"";var I=P.indexOf(H);if(I>-1){P=P.substring(4);}if(N.toString===Object.prototype.toString||I>-1){N=D.dump(N,parseInt(P,10));}else{N=N.toString();}}}else{if(!D.isString(N)&&!D.isNumber(N)){N="~-"+L.length+"-~";L[L.length]=C;}}Q=Q.substring(0,G)+N+Q.substring(F+1);}for(G=L.length-1;G>=0;G=G-1){Q=Q.replace(new RegExp("~-"+G+"-~"),"{"+L[G]+"}","g");}return Q;},trim:function(A){try{return A.replace(/^\s+|\s+$/g,"");}catch(B){return A;}},merge:function(){var C={},A=arguments,B;for(B=0;B<A.length;B=B+1){YAHOO.lang.augmentObject(C,A[B],true);}return C;},isValue:function(B){var A=YAHOO.lang;return(A.isObjec
t(B)||A.isString(B)||A.isNumber(B)||A.isBoolean(B));}};YAHOO.util.Lang=YAHOO.lang;YAHOO.lang.augment=YAHOO.lang.augmentProto;YAHOO.augment=YAHOO.lang.augmentProto;YAHOO.extend=YAHOO.lang.extend;YAHOO.register("yahoo",YAHOO,{version:"2.3.1",build:"541"});(function(){var B=YAHOO.util,K,I,H=0,J={},F={};var C=YAHOO.env.ua.opera,L=YAHOO.env.ua.webkit,A=YAHOO.env.ua.gecko,G=YAHOO.env.ua.ie;var E={HYPHEN:/(-[a-z])/i,ROOT_TAG:/^body|html$/i};var M=function(O){if(!E.HYPHEN.test(O)){return O;}if(J[O]){return J[O];}var P=O;while(E.HYPHEN.exec(P)){P=P.replace(RegExp.$1,RegExp.$1.substr(1).toUpperCase());}J[O]=P;return P;};var N=function(P){var O=F[P];if(!O){O=new RegExp("(?:^|\\s+)"+P+"(?:\\s+|$)");F[P]=O;}return O;};if(document.defaultView&&document.defaultView.getComputedStyle){K=function(O,R){var Q=null;if(R=="float"){R="cssFloat";}var P=document.defaultView.getComputedStyle(O,"");if(P){Q=P[M(R)];}return O.style[R]||Q;};}else{if(document.documentElement.currentStyle&&G){K=function(O,
Q){switch(M(Q)){case"opacity":var S=100;try{S=O.filters["DXImageTransform.Microsoft.Alpha"].opacity;}catch(R){try{S=O.filters("alpha").opacity;}catch(R){}}return S/100;case"float":Q="styleFloat";default:var P=O.currentStyle?O.currentStyle[Q]:null;return(O.style[Q]||P);}};}else{K=function(O,P){return O.style[P];};}}if(G){I=function(O,P,Q){switch(P){case"opacity":if(YAHOO.lang.isString(O.style.filter)){O.style.filter="alpha(opacity="+Q*100+")";if(!O.currentStyle||!O.currentStyle.hasLayout){O.style.zoom=1;}}break;case"float":P="styleFloat";default:O.style[P]=Q;}};}else{I=function(O,P,Q){if(P=="float"){P="cssFloat";}O.style[P]=Q;};}var D=function(O,P){return O&&O.nodeType==1&&(!P||P(O));};YAHOO.util.Dom={get:function(Q){if(Q&&(Q.tagName||Q.item)){return Q;}if(YAHOO.lang.isString(Q)||!Q){return document.getElementById(Q);}if(Q.length!==undefined){var R=[];for(var P=0,O=Q.length;P<O;++P){R[R.length]=B.Dom.get(Q[P]);}return R;}return Q;},getStyle:function(O,Q){Q=M(Q);var P=function
(R){return K(R,Q);};return B.Dom.batch(O,P,B.Dom,true);},setStyle:function(O,Q,R){Q=M(Q);var P=function(S){I(S,Q,R);};B.Dom.batch(O,P,B.Dom,true);},getXY:function(O){var P=function(R){if((R.parentNode===null||R.offsetParent===null||this.getStyle(R,"display")=="none")&&R!=document.body){return false;}var Q=null;var V=[];var S;var T=R.ownerDocument;if(R.getBoundingClientRect){S=R.getBoundingClientRect();return[S.left+B.Dom.getDocumentScrollLeft(R.ownerDocument),S.top+B.Dom.getDocumentScrollTop(R.ownerDocument)];}else{V=[R.offsetLeft,R.offsetTop];Q=R.offsetParent;var U=this.getStyle(R,"position")=="absolute";if(Q!=R){while(Q){V[0]+=Q.offsetLeft;V[1]+=Q.offsetTop;if(L&&!U&&this.getStyle(Q,"position")=="absolute"){U=true;}Q=Q.offsetParent;}}if(L&&U){V[0]-=R.ownerDocument.body.offsetLeft;V[1]-=R.ownerDocument.body.offsetTop;}}Q=R.parentNode;while(Q.tagName&&!E.ROOT_TAG.test(Q.tagName)){if(B.Dom.getStyle(Q,"display").search(/^inline|table-row.*$/i)){V[0]-=Q.scrollLeft;V[1]-=Q.scrol
lTop;}Q=Q.parentNode;}return V;};return B.Dom.batch(O,P,B.Dom,true);},getX:function(O){var P=function(Q){return B.Dom.getXY(Q)[0];};return B.Dom.batch(O,P,B.Dom,true);},getY:function(O){var P=function(Q){return B.Dom.getXY(Q)[1];};return B.Dom.batch(O,P,B.Dom,true);},setXY:function(O,R,Q){var P=function(U){var T=this.getStyle(U,"position");if(T=="static"){this.setStyle(U,"position","relative");T="relative";}var W=this.getXY(U);if(W===false){return false;}var V=[parseInt(this.getStyle(U,"left"),10),parseInt(this.getStyle(U,"top"),10)];if(isNaN(V[0])){V[0]=(T=="relative")?0:U.offsetLeft;}if(isNaN(V[1])){V[1]=(T=="relative")?0:U.offsetTop;}if(R[0]!==null){U.style.left=R[0]-W[0]+V[0]+"px";}if(R[1]!==null){U.style.top=R[1]-W[1]+V[1]+"px";}if(!Q){var S=this.getXY(U);if((R[0]!==null&&S[0]!=R[0])||(R[1]!==null&&S[1]!=R[1])){this.setXY(U,R,true);}}};B.Dom.batch(O,P,B.Dom,true);},setX:function(P,O){B.Dom.setXY(P,[O,null]);},setY:function(O,P){B.Dom.setXY(O,[null,P]);},getRegion:functi
on(O){var P=function(Q){if((Q.parentNode===null||Q.offsetParent===null||this.getStyle(Q,"display")=="none")&&Q!=document.body){return false;}var R=B.Region.getRegion(Q);return R;};return B.Dom.batch(O,P,B.Dom,true);},getClientWidth:function(){return B.Dom.getViewportWidth();},getClientHeight:function(){return B.Dom.getViewportHeight();},getElementsByClassName:function(S,W,T,U){W=W||"*";T=(T)?B.Dom.get(T):null||document;if(!T){return[];}var P=[],O=T.getElementsByTagName(W),V=N(S);for(var Q=0,R=O.length;Q<R;++Q){if(V.test(O[Q].className)){P[P.length]=O[Q];if(U){U.call(O[Q],O[Q]);}}}return P;},hasClass:function(Q,P){var O=N(P);var R=function(S){return O.test(S.className);};return B.Dom.batch(Q,R,B.Dom,true);},addClass:function(P,O){var Q=function(R){if(this.hasClass(R,O)){return false;}R.className=YAHOO.lang.trim([R.className,O].join(" "));return true;};return B.Dom.batch(P,Q,B.Dom,true);},removeClass:function(Q,P){var O=N(P);var R=function(S){if(!this.hasClass(S,P)){return fal
se;}var T=S.className;S.className=T.replace(O," ");if(this.hasClass(S,P)){this.removeClass(S,P);}S.className=YAHOO.lang.trim(S.className);return true;};return B.Dom.batch(Q,R,B.Dom,true);},replaceClass:function(R,P,O){if(!O||P===O){return false;}var Q=N(P);var S=function(T){if(!this.hasClass(T,P)){this.addClass(T,O);return true;}T.className=T.className.replace(Q," "+O+" ");if(this.hasClass(T,P)){this.replaceClass(T,P,O);}T.className=YAHOO.lang.trim(T.className);return true;};return B.Dom.batch(R,S,B.Dom,true);},generateId:function(O,Q){Q=Q||"yui-gen";var P=function(R){if(R&&R.id){return R.id;}var S=Q+H++;if(R){R.id=S;}return S;};return B.Dom.batch(O,P,B.Dom,true)||P.apply(B.Dom,arguments);},isAncestor:function(P,Q){P=B.Dom.get(P);if(!P||!Q){return false;}var O=function(R){if(P.contains&&R.nodeType&&!L){return P.contains(R);}else{if(P.compareDocumentPosition&&R.nodeType){return!!(P.compareDocumentPosition(R)&16);}else{if(R.nodeType){return!!this.getAncestorBy(R,function(S){re
turn S==P;});}}}return false;};return B.Dom.batch(Q,O,B.Dom,true);},inDocument:function(O){var P=function(Q){if(L){while(Q=Q.parentNode){if(Q==document.documentElement){return true;}}return false;}return this.isAncestor(document.documentElement,Q);};return B.Dom.batch(O,P,B.Dom,true);},getElementsBy:function(V,P,Q,S){P=P||"*";Q=(Q)?B.Dom.get(Q):null||document;if(!Q){return[];}var R=[],U=Q.getElementsByTagName(P);for(var T=0,O=U.length;T<O;++T){if(V(U[T])){R[R.length]=U[T];if(S){S(U[T]);}}}return R;},batch:function(S,V,U,Q){S=(S&&(S.tagName||S.item))?S:B.Dom.get(S);if(!S||!V){return false;}var R=(Q)?U:window;if(S.tagName||S.length===undefined){return V.call(R,S,U);}var T=[];for(var P=0,O=S.length;P<O;++P){T[T.length]=V.call(R,S[P],U);}return T;},getDocumentHeight:function(){var P=(document.compatMode!="CSS1Compat")?document.body.scrollHeight:document.documentElement.scrollHeight;var O=Math.max(P,B.Dom.getViewportHeight());return O;},getDocumentWidth:function(){var P=(document
.compatMode!="CSS1Compat")?document.body.scrollWidth:document.documentElement.scrollWidth;var O=Math.max(P,B.Dom.getViewportWidth());return O;},getViewportHeight:function(){var O=self.innerHeight;var P=document.compatMode;if((P||G)&&!C){O=(P=="CSS1Compat")?document.documentElement.clientHeight:document.body.clientHeight;}return O;},getViewportWidth:function(){var O=self.innerWidth;var P=document.compatMode;if(P||G){O=(P=="CSS1Compat")?document.documentElement.clientWidth:document.body.clientWidth;}return O;},getAncestorBy:function(O,P){while(O=O.parentNode){if(D(O,P)){return O;}}return null;},getAncestorByClassName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return B.Dom.hasClass(R,O);};return B.Dom.getAncestorBy(P,Q);},getAncestorByTagName:function(P,O){P=B.Dom.get(P);if(!P){return null;}var Q=function(R){return R.tagName&&R.tagName.toUpperCase()==O.toUpperCase();};return B.Dom.getAncestorBy(P,Q);},getPreviousSiblingBy:function(O,P){while(O){O=O.previ
ousSibling;if(D(O,P)){return O;}}return null;},getPreviousSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getPreviousSiblingBy(O);},getNextSiblingBy:function(O,P){while(O){O=O.nextSibling;if(D(O,P)){return O;}}return null;},getNextSibling:function(O){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getNextSiblingBy(O);},getFirstChildBy:function(O,Q){var P=(D(O.firstChild,Q))?O.firstChild:null;return P||B.Dom.getNextSiblingBy(O.firstChild,Q);},getFirstChild:function(O,P){O=B.Dom.get(O);if(!O){return null;}return B.Dom.getFirstChildBy(O);},getLastChildBy:function(O,Q){if(!O){return null;}var P=(D(O.lastChild,Q))?O.lastChild:null;return P||B.Dom.getPreviousSiblingBy(O.lastChild,Q);},getLastChild:function(O){O=B.Dom.get(O);return B.Dom.getLastChildBy(O);},getChildrenBy:function(P,R){var Q=B.Dom.getFirstChildBy(P,R);var O=Q?[Q]:[];B.Dom.getNextSiblingBy(Q,function(S){if(!R||R(S)){O[O.length]=S;}return false;});return O;},getChildren:function(O){O=B.Dom.get(O);i
f(!O){}return B.Dom.getChildrenBy(O);},getDocumentScrollLeft:function(O){O=O||document;return Math.max(O.documentElement.scrollLeft,O.body.scrollLeft);},getDocumentScrollTop:function(O){O=O||document;return Math.max(O.documentElement.scrollTop,O.body.scrollTop);},insertBefore:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}return O.parentNode.insertBefore(P,O);},insertAfter:function(P,O){P=B.Dom.get(P);O=B.Dom.get(O);if(!P||!O||!O.parentNode){return null;}if(O.nextSibling){return O.parentNode.insertBefore(P,O.nextSibling);}else{return O.parentNode.appendChild(P);}}};})();YAHOO.util.Region=function(C,D,A,B){this.top=C;this[1]=C;this.right=D;this.bottom=A;this.left=B;this[0]=B;};YAHOO.util.Region.prototype.contains=function(A){return(A.left>=this.left&&A.right<=this.right&&A.top>=this.top&&A.bottom<=this.bottom);};YAHOO.util.Region.prototype.getArea=function(){return((this.bottom-this.top)*(this.right-this.left));};YAHOO.util.Region.prototype
.intersect=function(E){var C=Math.max(this.top,E.top);var D=Math.min(this.right,E.right);var A=Math.min(this.bottom,E.bottom);var B=Math.max(this.left,E.left);if(A>=C&&D>=B){return new YAHOO.util.Region(C,D,A,B);}else{return null;}};YAHOO.util.Region.prototype.union=function(E){var C=Math.min(this.top,E.top);var D=Math.max(this.right,E.right);var A=Math.max(this.bottom,E.bottom);var B=Math.min(this.left,E.left);return new YAHOO.util.Region(C,D,A,B);};YAHOO.util.Region.prototype.toString=function(){return("Region {top: "+this.top+", right: "+this.right+", bottom: "+this.bottom+", left: "+this.left+"}");};YAHOO.util.Region.getRegion=function(D){var F=YAHOO.util.Dom.getXY(D);var C=F[1];var E=F[0]+D.offsetWidth;var A=F[1]+D.offsetHeight;var B=F[0];return new YAHOO.util.Region(C,E,A,B);};YAHOO.util.Point=function(A,B){if(YAHOO.lang.isArray(A)){B=A[1];A=A[0];}this.x=this.right=this.left=this[0]=A;this.y=this.top=this.bottom=this[1]=B;};YAHOO.util.Point.prototype=new YAHOO.util.Reg
ion();YAHOO.register("dom",YAHOO.util.Dom,{version:"2.3.1",build:"541"});YAHOO.util.CustomEvent=function(D,B,C,A){this.type=D;this.scope=B||window;this.silent=C;this.signature=A||YAHOO.util.CustomEvent.LIST;this.subscribers=[];if(!this.silent){}var E="_YUICEOnSubscribe";if(D!==E){this.subscribeEvent=new YAHOO.util.CustomEvent(E,this,true);}this.lastError=null;};YAHOO.util.CustomEvent.LIST=0;YAHOO.util.CustomEvent.FLAT=1;YAHOO.util.CustomEvent.prototype={subscribe:function(B,C,A){if(!B){throw new Error("Invalid callback for subscriber to '"+this.type+"'");}if(this.subscribeEvent){this.subscribeEvent.fire(B,C,A);}this.subscribers.push(new YAHOO.util.Subscriber(B,C,A));},unsubscribe:function(D,F){if(!D){return this.unsubscribeAll();}var E=false;for(var B=0,A=this.subscribers.length;B<A;++B){var C=this.subscribers[B];if(C&&C.contains(D,F)){this._delete(B);E=true;}}return E;},fire:function(){var E=this.subscribers.length;if(!E&&this.silent){return true;}var H=[],G=true,D,I=false;
for(D=0;D<arguments.length;++D){H.push(arguments[D]);}var A=H.length;if(!this.silent){}for(D=0;D<E;++D){var L=this.subscribers[D];if(!L){I=true;}else{if(!this.silent){}var K=L.getScope(this.scope);if(this.signature==YAHOO.util.CustomEvent.FLAT){var B=null;if(H.length>0){B=H[0];}try{G=L.fn.call(K,B,L.obj);}catch(F){this.lastError=F;}}else{try{G=L.fn.call(K,this.type,H,L.obj);}catch(F){this.lastError=F;}}if(false===G){if(!this.silent){}return false;}}}if(I){var J=[],C=this.subscribers;for(D=0,E=C.length;D<E;D=D+1){J.push(C[D]);}this.subscribers=J;}return true;},unsubscribeAll:function(){for(var B=0,A=this.subscribers.length;B<A;++B){this._delete(A-1-B);}this.subscribers=[];return B;},_delete:function(A){var B=this.subscribers[A];if(B){delete B.fn;delete B.obj;}this.subscribers[A]=null;},toString:function(){return"CustomEvent: '"+this.type+"', scope: "+this.scope;}};YAHOO.util.Subscriber=function(B,C,A){this.fn=B;this.obj=YAHOO.lang.isUndefined(C)?null:C;this.override=A;};YAHOO
.util.Subscriber.prototype.getScope=function(A){if(this.override){if(this.override===true){return this.obj;}else{return this.override;}}return A;};YAHOO.util.Subscriber.prototype.contains=function(A,B){if(B){return(this.fn==A&&this.obj==B);}else{return(this.fn==A);}};YAHOO.util.Subscriber.prototype.toString=function(){return"Subscriber { obj: "+this.obj+", override: "+(this.override||"no")+" }";};if(!YAHOO.util.Event){YAHOO.util.Event=function(){var H=false;var J=false;var I=[];var K=[];var G=[];var E=[];var C=0;var F=[];var B=[];var A=0;var D={63232:38,63233:40,63234:37,63235:39};return{POLL_RETRYS:4000,POLL_INTERVAL:10,EL:0,TYPE:1,FN:2,WFN:3,UNLOAD_OBJ:3,ADJ_SCOPE:4,OBJ:5,OVERRIDE:6,lastError:null,isSafari:YAHOO.env.ua.webkit,webkit:YAHOO.env.ua.webkit,isIE:YAHOO.env.ua.ie,_interval:null,startInterval:function(){if(!this._interval){var L=this;var M=function(){L._tryPreloadAttach();};this._interval=setInterval(M,this.POLL_INTERVAL);}},onAvailable:function(N,L,O,M){F.push({i
d:N,fn:L,obj:O,override:M,checkReady:false});C=this.POLL_RETRYS;this.startInterval();},onDOMReady:function(L,N,M){if(J){setTimeout(function(){var O=window;if(M){if(M===true){O=N;}else{O=M;}}L.call(O,"DOMReady",[],N);},0);}else{this.DOMReadyEvent.subscribe(L,N,M);}},onContentReady:function(N,L,O,M){F.push({id:N,fn:L,obj:O,override:M,checkReady:true});C=this.POLL_RETRYS;this.startInterval();},addListener:function(N,L,W,R,M){if(!W||!W.call){return false;}if(this._isValidCollection(N)){var X=true;for(var S=0,U=N.length;S<U;++S){X=this.on(N[S],L,W,R,M)&&X;}return X;}else{if(YAHOO.lang.isString(N)){var Q=this.getEl(N);if(Q){N=Q;}else{this.onAvailable(N,function(){YAHOO.util.Event.on(N,L,W,R,M);});return true;}}}if(!N){return false;}if("unload"==L&&R!==this){K[K.length]=[N,L,W,R,M];return true;}var Z=N;if(M){if(M===true){Z=R;}else{Z=M;}}var O=function(a){return W.call(Z,YAHOO.util.Event.getEvent(a,N),R);};var Y=[N,L,W,O,Z,R,M];var T=I.length;I[T]=Y;if(this.useLegacyEvent(N,L)){var
P=this.getLegacyIndex(N,L);if(P==-1||N!=G[P][0]){P=G.length;B[N.id+L]=P;G[P]=[N,L,N["on"+L]];E[P]=[];N["on"+L]=function(a){YAHOO.util.Event.fireLegacyEvent(YAHOO.util.Event.getEvent(a),P);};}E[P].push(Y);}else{try{this._simpleAdd(N,L,O,false);}catch(V){this.lastError=V;this.removeListener(N,L,W);return false;}}return true;},fireLegacyEvent:function(P,N){var R=true,L,T,S,U,Q;T=E[N];for(var M=0,O=T.length;M<O;++M){S=T[M];if(S&&S[this.WFN]){U=S[this.ADJ_SCOPE];Q=S[this.WFN].call(U,P);R=(R&&Q);}}L=G[N];if(L&&L[2]){L[2](P);}return R;},getLegacyIndex:function(M,N){var L=this.generateId(M)+N;if(typeof B[L]=="undefined"){return-1;}else{return B[L];}},useLegacyEvent:function(M,N){if(this.webkit&&("click"==N||"dblclick"==N)){var L=parseInt(this.webkit,10);if(!isNaN(L)&&L<418){return true;}}return false;},removeListener:function(M,L,U){var P,S,W;if(typeof M=="string"){M=this.getEl(M);}else{if(this._isValidCollection(M)){var V=true;for(P=0,S=M.length;P<S;++P){V=(this.removeListener(M[P]
,L,U)&&V);}return V;}}if(!U||!U.call){return this.purgeElement(M,false,L);}if("unload"==L){for(P=0,S=K.length;P<S;P++){W=K[P];if(W&&W[0]==M&&W[1]==L&&W[2]==U){K[P]=null;return true;}}return false;}var Q=null;var R=arguments[3];if("undefined"===typeof R){R=this._getCacheIndex(M,L,U);}if(R>=0){Q=I[R];}if(!M||!Q){return false;}if(this.useLegacyEvent(M,L)){var O=this.getLegacyIndex(M,L);var N=E[O];if(N){for(P=0,S=N.length;P<S;++P){W=N[P];if(W&&W[this.EL]==M&&W[this.TYPE]==L&&W[this.FN]==U){N[P]=null;break;}}}}else{try{this._simpleRemove(M,L,Q[this.WFN],false);}catch(T){this.lastError=T;return false;}}delete I[R][this.WFN];delete I[R][this.FN];I[R]=null;return true;},getTarget:function(N,M){var L=N.target||N.srcElement;return this.resolveTextNode(L);},resolveTextNode:function(L){if(L&&3==L.nodeType){return L.parentNode;}else{return L;}},getPageX:function(M){var L=M.pageX;if(!L&&0!==L){L=M.clientX||0;if(this.isIE){L+=this._getScrollLeft();}}return L;},getPageY:function(L){var M=L.
pageY;if(!M&&0!==M){M=L.clientY||0;if(this.isIE){M+=this._getScrollTop();}}return M;},getXY:function(L){return[this.getPageX(L),this.getPageY(L)];},getRelatedTarget:function(M){var L=M.relatedTarget;if(!L){if(M.type=="mouseout"){L=M.toElement;}else{if(M.type=="mouseover"){L=M.fromElement;}}}return this.resolveTextNode(L);},getTime:function(N){if(!N.time){var M=new Date().getTime();try{N.time=M;}catch(L){this.lastError=L;return M;}}return N.time;},stopEvent:function(L){this.stopPropagation(L);this.preventDefault(L);},stopPropagation:function(L){if(L.stopPropagation){L.stopPropagation();}else{L.cancelBubble=true;}},preventDefault:function(L){if(L.preventDefault){L.preventDefault();}else{L.returnValue=false;}},getEvent:function(Q,O){var P=Q||window.event;if(!P){var R=this.getEvent.caller;while(R){P=R.arguments[0];if(P&&Event==P.constructor){break;}R=R.caller;}}if(P&&this.isIE){try{var N=P.srcElement;if(N){var M=N.type;}}catch(L){P.target=O;}}return P;},getCharCode:function(M){v
ar L=M.keyCode||M.charCode||0;if(YAHOO.env.ua.webkit&&(L in D)){L=D[L];}return L;},_getCacheIndex:function(P,Q,O){for(var N=0,M=I.length;N<M;++N){var L=I[N];if(L&&L[this.FN]==O&&L[this.EL]==P&&L[this.TYPE]==Q){return N;}}return-1;},generateId:function(L){var M=L.id;if(!M){M="yuievtautoid-"+A;++A;L.id=M;}return M;},_isValidCollection:function(M){try{return(typeof M!=="string"&&M.length&&!M.tagName&&!M.alert&&typeof M[0]!=="undefined");}catch(L){return false;}},elCache:{},getEl:function(L){return(typeof L==="string")?document.getElementById(L):L;},clearCache:function(){},DOMReadyEvent:new YAHOO.util.CustomEvent("DOMReady",this),_load:function(M){if(!H){H=true;var L=YAHOO.util.Event;L._ready();L._tryPreloadAttach();}},_ready:function(M){if(!J){J=true;var L=YAHOO.util.Event;L.DOMReadyEvent.fire();L._simpleRemove(document,"DOMContentLoaded",L._ready);}},_tryPreloadAttach:function(){if(this.locked){return false;}if(this.isIE){if(!J){this.startInterval();return false;}}this.locked=
true;var Q=!H;if(!Q){Q=(C>0);}var P=[];var R=function(T,U){var S=T;if(U.override){if(U.override===true){S=U.obj;}else{S=U.override;}}U.fn.call(S,U.obj);};var M,L,O,N;for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&!O.checkReady){N=this.getEl(O.id);if(N){R(N,O);F[M]=null;}else{P.push(O);}}}for(M=0,L=F.length;M<L;++M){O=F[M];if(O&&O.checkReady){N=this.getEl(O.id);if(N){if(H||N.nextSibling){R(N,O);F[M]=null;}}else{P.push(O);}}}C=(P.length===0)?0:C-1;if(Q){this.startInterval();}else{clearInterval(this._interval);this._interval=null;}this.locked=false;return true;},purgeElement:function(O,P,R){var Q=this.getListeners(O,R),N,L;if(Q){for(N=0,L=Q.length;N<L;++N){var M=Q[N];this.removeListener(O,M.type,M.fn,M.index);}}if(P&&O&&O.childNodes){for(N=0,L=O.childNodes.length;N<L;++N){this.purgeElement(O.childNodes[N],P,R);}}},getListeners:function(N,L){var Q=[],M;if(!L){M=[I,K];}else{if(L=="unload"){M=[K];}else{M=[I];}}for(var P=0;P<M.length;P=P+1){var T=M[P];if(T&&T.length>0){for(var R=0,S=T.le
ngth;R<S;++R){var O=T[R];if(O&&O[this.EL]===N&&(!L||L===O[this.TYPE])){Q.push({type:O[this.TYPE],fn:O[this.FN],obj:O[this.OBJ],adjust:O[this.OVERRIDE],scope:O[this.ADJ_SCOPE],index:R});}}}}return(Q.length)?Q:null;},_unload:function(S){var R=YAHOO.util.Event,P,O,M,L,N;for(P=0,L=K.length;P<L;++P){M=K[P];if(M){var Q=window;if(M[R.ADJ_SCOPE]){if(M[R.ADJ_SCOPE]===true){Q=M[R.UNLOAD_OBJ];}else{Q=M[R.ADJ_SCOPE];}}M[R.FN].call(Q,R.getEvent(S,M[R.EL]),M[R.UNLOAD_OBJ]);K[P]=null;M=null;Q=null;}}K=null;if(I&&I.length>0){O=I.length;while(O){N=O-1;M=I[N];if(M){R.removeListener(M[R.EL],M[R.TYPE],M[R.FN],N);}O=O-1;}M=null;R.clearCache();}for(P=0,L=G.length;P<L;++P){G[P][0]=null;G[P]=null;}G=null;R._simpleRemove(window,"unload",R._unload);},_getScrollLeft:function(){return this._getScroll()[1];},_getScrollTop:function(){return this._getScroll()[0];},_getScroll:function(){var L=document.documentElement,M=document.body;if(L&&(L.scrollTop||L.scrollLeft)){return[L.scrollTop,L.scrollLeft];}else{
if(M){return[M.scrollTop,M.scrollLeft];}else{return[0,0];}}},regCE:function(){},_simpleAdd:function(){if(window.addEventListener){return function(N,O,M,L){N.addEventListener(O,M,(L));};}else{if(window.attachEvent){return function(N,O,M,L){N.attachEvent("on"+O,M);};}else{return function(){};}}}(),_simpleRemove:function(){if(window.removeEventListener){return function(N,O,M,L){N.removeEventListener(O,M,(L));};}else{if(window.detachEvent){return function(M,N,L){M.detachEvent("on"+N,L);};}else{return function(){};}}}()};}();(function(){var D=YAHOO.util.Event;D.on=D.addListener;if(D.isIE){YAHOO.util.Event.onDOMReady(YAHOO.util.Event._tryPreloadAttach,YAHOO.util.Event,true);var B,E=document,A=E.body;if(("undefined"!==typeof YAHOO_config)&&YAHOO_config.injecting){B=document.createElement("script");var C=E.getElementsByTagName("head")[0]||A;C.insertBefore(B,C.firstChild);}else{E.write("<script id=\"_yui_eu_dr\" defer=\"true\" src=\"//:\"></script>");B=document.getElementById("_yui_e
u_dr");}if(B){B.onreadystatechange=function(){if("complete"===this.readyState){this.parentNode.removeChild(this);YAHOO.util.Event._ready();}};}else{}B=null;}else{if(D.webkit){D._drwatch=setInterval(function(){var F=document.readyState;if("loaded"==F||"complete"==F){clearInterval(D._drwatch);D._drwatch=null;D._ready();}},D.POLL_INTERVAL);}else{D._simpleAdd(document,"DOMContentLoaded",D._ready);}}D._simpleAdd(window,"load",D._load);D._simpleAdd(window,"unload",D._unload);D._tryPreloadAttach();})();}YAHOO.util.EventProvider=function(){};YAHOO.util.EventProvider.prototype={__yui_events:null,__yui_subscribers:null,subscribe:function(A,C,F,E){this.__yui_events=this.__yui_events||{};var D=this.__yui_events[A];if(D){D.subscribe(C,F,E);}else{this.__yui_subscribers=this.__yui_subscribers||{};var B=this.__yui_subscribers;if(!B[A]){B[A]=[];}B[A].push({fn:C,obj:F,override:E});}},unsubscribe:function(C,E,G){this.__yui_events=this.__yui_events||{};var A=this.__yui_events;if(C){var F=A[C];i
f(F){return F.unsubscribe(E,G);}}else{var B=true;for(var D in A){if(YAHOO.lang.hasOwnProperty(A,D)){B=B&&A[D].unsubscribe(E,G);}}return B;}return false;},unsubscribeAll:function(A){return this.unsubscribe(A);},createEvent:function(G,D){this.__yui_events=this.__yui_events||{};var A=D||{};var I=this.__yui_events;if(I[G]){}else{var H=A.scope||this;var E=(A.silent);var B=new YAHOO.util.CustomEvent(G,H,E,YAHOO.util.CustomEvent.FLAT);I[G]=B;if(A.onSubscribeCallback){B.subscribeEvent.subscribe(A.onSubscribeCallback);}this.__yui_subscribers=this.__yui_subscribers||{};var F=this.__yui_subscribers[G];if(F){for(var C=0;C<F.length;++C){B.subscribe(F[C].fn,F[C].obj,F[C].override);}}}return I[G];},fireEvent:function(E,D,A,C){this.__yui_events=this.__yui_events||{};var G=this.__yui_events[E];if(!G){return null;}var B=[];for(var F=1;F<arguments.length;++F){B.push(arguments[F]);}return G.fire.apply(G,B);},hasEvent:function(A){if(this.__yui_events){if(this.__yui_events[A]){return true;}}retur
n false;}};YAHOO.util.KeyListener=function(A,F,B,C){if(!A){}else{if(!F){}else{if(!B){}}}if(!C){C=YAHOO.util.KeyListener.KEYDOWN;}var D=new YAHOO.util.CustomEvent("keyPressed");this.enabledEvent=new YAHOO.util.CustomEvent("enabled");this.disabledEvent=new YAHOO.util.CustomEvent("disabled");if(typeof A=="string"){A=document.getElementById(A);}if(typeof B=="function"){D.subscribe(B);}else{D.subscribe(B.fn,B.scope,B.correctScope);}function E(K,J){if(!F.shift){F.shift=false;}if(!F.alt){F.alt=false;}if(!F.ctrl){F.ctrl=false;}if(K.shiftKey==F.shift&&K.altKey==F.alt&&K.ctrlKey==F.ctrl){var H;var G;if(F.keys instanceof Array){for(var I=0;I<F.keys.length;I++){H=F.keys[I];if(H==K.charCode){D.fire(K.charCode,K);break;}else{if(H==K.keyCode){D.fire(K.keyCode,K);break;}}}}else{H=F.keys;if(H==K.charCode){D.fire(K.charCode,K);}else{if(H==K.keyCode){D.fire(K.keyCode,K);}}}}}this.enable=function(){if(!this.enabled){YAHOO.util.Event.addListener(A,C,E);this.enabledEvent.fire(F);}this.enabled=tru
e;};this.disable=function(){if(this.enabled){YAHOO.util.Event.removeListener(A,C,E);this.disabledEvent.fire(F);}this.enabled=false;};this.toString=function(){return"KeyListener ["+F.keys+"] "+A.tagName+(A.id?"["+A.id+"]":"");};};YAHOO.util.KeyListener.KEYDOWN="keydown";YAHOO.util.KeyListener.KEYUP="keyup";YAHOO.register("event",YAHOO.util.Event,{version:"2.3.1",build:"541"});YAHOO.register("yahoo-dom-event",YAHOO,{version:"2.3.1",build:"541"});
\ No newline at end of file
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yui_item.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yui_item.js?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yui_item.js (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Report/Template/yui_item.js Sat Aug 2 07:11:35 2008
@@ -0,0 +1,5 @@
+ "panel{line}": {
+ "header": "{header}",
+ "body": "<ul>{tests}</ul>",
+ "footer": ""
+ },
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton.php Sat Aug 2 07:11:35 2008
@@ -0,0 +1,394 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Sebastian Bergmann nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id: Skeleton.php 1985 2007-12-26 18:11:55Z sb $
+ * @link http://www.phpunit.de/
+ * @since File available since Release 2.1.0
+ */
+
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Util/Template.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Generator for TestCase skeletons.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version Release: 3.2.9
+ * @link http://www.phpunit.de/
+ * @since Class available since Release 2.1.0
+ */
+class PHPUnit_Util_Skeleton
+{
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $className;
+
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $classSourceFile;
+
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $testSourceFile;
+
+ /**
+ * @var array
+ * @access protected
+ */
+ protected $methodNameCounter = array();
+
+ /**
+ * Constructor.
+ *
+ * @param string $className
+ * @param string $classSourceFile
+ * @throws RuntimeException
+ * @access public
+ */
+ public function __construct($className, $classSourceFile = '')
+ {
+ $this->className = $className;
+ $this->testSourceFile = $className . 'Test.php';
+
+ if (class_exists($className)) {
+ $this->classSourceFile = '<internal>';
+ }
+
+ else if (empty($classSourceFile) && is_file($className . '.php')) {
+ $this->classSourceFile = $className . '.php';
+ }
+
+ else if (empty($classSourceFile) ||
+ is_file(str_replace('_', '/', $className) . '.php')) {
+ $this->classSourceFile = str_replace('_', '/', $className) . '.php';
+ $this->testSourceFile = str_replace('_', '/', $className) . 'Test.php';
+ }
+
+ else if (empty($classSourceFile)) {
+ throw new RuntimeException(
+ sprintf(
+ 'Neither "%s.php" nor "%s.php" could be opened.',
+ $className,
+ str_replace('_', '/', $className)
+ )
+ );
+ }
+
+ else if (!is_file($classSourceFile)) {
+ throw new RuntimeException(
+ sprintf(
+ '"%s" could not be opened.',
+
+ $classSourceFile
+ )
+ );
+ } else {
+ $this->classSourceFile = $classSourceFile;
+ }
+
+ if ($this->classSourceFile != '<internal>') {
+ include_once $this->classSourceFile;
+ }
+
+ if (!class_exists($className)) {
+ throw new RuntimeException(
+ sprintf(
+ 'Could not find class "%s" in "%s".',
+
+ $className,
+ realpath($this->classSourceFile)
+ )
+ );
+ }
+ }
+
+ /**
+ * Generates the test class' source.
+ *
+ * @param boolean $verbose
+ * @return mixed
+ * @access public
+ */
+ public function generate($verbose = FALSE)
+ {
+ $class = new ReflectionClass($this->className);
+ $methods = '';
+ $incompleteMethods = '';
+
+ foreach ($class->getMethods() as $method) {
+ if (!$method->isConstructor() &&
+ !$method->isAbstract() &&
+ $method->isPublic() &&
+ $method->getDeclaringClass()->getName() == $this->className) {
+ $assertAnnotationFound = FALSE;
+
+ if (preg_match_all('/@assert(.*)$/Um', $method->getDocComment(), $annotations)) {
+ foreach ($annotations[1] as $annotation) {
+ if (preg_match('/\((.*)\)\s+([^\s]*)\s+(.*)/', $annotation, $matches)) {
+ switch ($matches[2]) {
+ case '==': {
+ $assertion = 'Equals';
+ }
+ break;
+
+ case '!=': {
+ $assertion = 'NotEquals';
+ }
+ break;
+
+ case '===': {
+ $assertion = 'Same';
+ }
+ break;
+
+ case '!==': {
+ $assertion = 'NotSame';
+ }
+ break;
+
+ case '>': {
+ $assertion = 'GreaterThan';
+ }
+ break;
+
+ case '>=': {
+ $assertion = 'GreaterThanOrEqual';
+ }
+ break;
+
+ case '<': {
+ $assertion = 'LessThan';
+ }
+ break;
+
+ case '<=': {
+ $assertion = 'LessThanOrEqual';
+ }
+ break;
+
+ case 'throws': {
+ $assertion = 'exception';
+ }
+ break;
+
+ default: {
+ throw new RuntimeException;
+ }
+ }
+
+ if ($assertion == 'exception') {
+ $template = 'TestMethodException';
+ }
+
+ else if ($assertion == 'Equals' && strtolower($matches[3]) == 'true') {
+ $assertion = 'True';
+ $template = 'TestMethodBool';
+ }
+
+ else if ($assertion == 'NotEquals' && strtolower($matches[3]) == 'true') {
+ $assertion = 'False';
+ $template = 'TestMethodBool';
+ }
+
+ else if ($assertion == 'Equals' && strtolower($matches[3]) == 'false') {
+ $assertion = 'False';
+ $template = 'TestMethodBool';
+ }
+
+ else if ($assertion == 'NotEquals' && strtolower($matches[3]) == 'false') {
+ $assertion = 'True';
+ $template = 'TestMethodBool';
+ }
+
+ else {
+ $template = 'TestMethod';
+ }
+
+ if ($method->isStatic()) {
+ $template .= 'Static';
+ }
+
+ $methodTemplate = new PHPUnit_Util_Template(
+ sprintf(
+ '%s%sSkeleton%s%s.tpl',
+
+ dirname(__FILE__),
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR,
+ $template
+ )
+ );
+
+ $origMethodName = $method->getName();
+ $methodName = ucfirst($origMethodName);
+
+ if (isset($this->methodNameCounter[$methodName])) {
+ $this->methodNameCounter[$methodName]++;
+ } else {
+ $this->methodNameCounter[$methodName] = 1;
+ }
+
+ if ($this->methodNameCounter[$methodName] > 1) {
+ $methodName .= $this->methodNameCounter[$methodName];
+ }
+
+ $methodTemplate->setVar(
+ array(
+ 'annotation' => trim($annotation),
+ 'arguments' => $matches[1],
+ 'assertion' => isset($assertion) ? $assertion : '',
+ 'expected' => $matches[3],
+ 'origMethodName' => $origMethodName,
+ 'className' => $this->className,
+ 'methodName' => $methodName
+ )
+ );
+
+ $methods .= $methodTemplate->render();
+
+ $assertAnnotationFound = TRUE;
+ }
+ }
+ }
+
+ if (!$assertAnnotationFound) {
+ $methodTemplate = new PHPUnit_Util_Template(
+ sprintf(
+ '%s%sSkeleton%sIncompleteTestMethod.tpl',
+
+ dirname(__FILE__),
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR
+ )
+ );
+
+ $methodTemplate->setVar(
+ array(
+ 'methodName' => ucfirst($method->getName())
+ )
+ );
+
+ $incompleteMethods .= $methodTemplate->render();
+ }
+ }
+ }
+
+ $classTemplate = new PHPUnit_Util_Template(
+ sprintf(
+ '%s%sSkeleton%sTestClass.tpl',
+
+ dirname(__FILE__),
+ DIRECTORY_SEPARATOR,
+ DIRECTORY_SEPARATOR
+ )
+ );
+
+ if ($this->classSourceFile != '<internal>') {
+ $requireClassFile = sprintf(
+ "\n\nrequire_once '%s';",
+
+ $this->classSourceFile
+ );
+ } else {
+ $requireClassFile = '';
+ }
+
+ $classTemplate->setVar(
+ array(
+ 'className' => $this->className,
+ 'requireClassFile' => $requireClassFile,
+ 'methods' => $methods . $incompleteMethods,
+ 'date' => date('Y-m-d'),
+ 'time' => date('H:i:s')
+ )
+ );
+
+ if (!$verbose) {
+ return $classTemplate->render();
+ } else {
+ return array(
+ 'code' => $classTemplate->render(),
+ 'incomplete' => empty($methods)
+ );
+ }
+ }
+
+ /**
+ * Generates the test class and writes it to a source file.
+ *
+ * @param string $file
+ * @access public
+ */
+ public function write($file = '')
+ {
+ if ($file == '') {
+ $file = $this->testSourceFile;
+ }
+
+ if ($fp = @fopen($file, 'wt')) {
+ @fwrite($fp, $this->generate());
+ @fclose($fp);
+ }
+ }
+
+ /**
+ * @return string
+ * @access public
+ * @since Method available since Release 3.0.0
+ */
+ public function getTestSourceFile()
+ {
+ return $this->testSourceFile;
+ }
+}
+?>
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/IncompleteTestMethod.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/IncompleteTestMethod.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/IncompleteTestMethod.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/IncompleteTestMethod.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,10 @@
+
+ /**
+ * @todo Implement test{methodName}().
+ */
+ public function test{methodName}() {
+ // Remove the following lines when you implement this test.
+ $this->markTestIncomplete(
+ 'This test has not been implemented yet.'
+ );
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestClass.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestClass.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestClass.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestClass.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,61 @@
+<?php
+// Call {className}Test::main() if this source file is executed directly.
+if (!defined('PHPUnit_MAIN_METHOD')) {
+ define('PHPUnit_MAIN_METHOD', '{className}Test::main');
+}
+
+require_once 'PHPUnit/Framework.php';{requireClassFile}
+
+/**
+ * Test class for {className}.
+ * Generated by PHPUnit on {date} at {time}.
+ */
+class {className}Test extends PHPUnit_Framework_TestCase
+{
+ /**
+ * @var {className}
+ * @access protected
+ */
+ protected $object;
+
+ /**
+ * Runs the test methods of this class.
+ *
+ * @access public
+ * @static
+ */
+ public static function main()
+ {
+ require_once 'PHPUnit/TextUI/TestRunner.php';
+
+ $suite = new PHPUnit_Framework_TestSuite('{className}Test');
+ $result = PHPUnit_TextUI_TestRunner::run($suite);
+ }
+
+ /**
+ * Sets up the fixture, for example, opens a network connection.
+ * This method is called before a test is executed.
+ *
+ * @access protected
+ */
+ protected function setUp()
+ {
+ $this->object = new {className};
+ }
+
+ /**
+ * Tears down the fixture, for example, closes a network connection.
+ * This method is called after a test is executed.
+ *
+ * @access protected
+ */
+ protected function tearDown()
+ {
+ }
+{methods}}
+
+// Call {className}Test::main() if this source file is executed directly.
+if (PHPUnit_MAIN_METHOD == '{className}Test::main') {
+ {className}Test::main();
+}
+?>
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethod.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethod.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethod.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethod.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,11 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ */
+ public function test{methodName}()
+ {
+ $this->assert{assertion}(
+ {expected},
+ $this->object->{origMethodName}({arguments})
+ );
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBool.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBool.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBool.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBool.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,10 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ */
+ public function test{methodName}()
+ {
+ $this->assert{assertion}(
+ $this->object->{origMethodName}({arguments})
+ );
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBoolStatic.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBoolStatic.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBoolStatic.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodBoolStatic.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,10 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ */
+ public function test{methodName}()
+ {
+ $this->assert{assertion}(
+ {className}::{origMethodName}({arguments})
+ );
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodException.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodException.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodException.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodException.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,9 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ * @expectedException {expected}
+ */
+ public function test{methodName}()
+ {
+ $this->object->{origMethodName}({arguments});
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodExceptionStatic.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodExceptionStatic.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodExceptionStatic.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodExceptionStatic.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,9 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ * @expectedException {expected}
+ */
+ public function test{methodName}()
+ {
+ {className}::{origMethodName}({arguments});
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodStatic.tpl
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodStatic.tpl?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodStatic.tpl (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Skeleton/TestMethodStatic.tpl Sat Aug 2 07:11:35 2008
@@ -0,0 +1,11 @@
+
+ /**
+ * Generated from @assert {annotation}.
+ */
+ public function test{methodName}()
+ {
+ $this->assert{assertion}(
+ {expected},
+ {className}::{origMethodName}({arguments})
+ );
+ }
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Template.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Template.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Template.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Template.php Sat Aug 2 07:11:35 2008
@@ -0,0 +1,172 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Sebastian Bergmann nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id: Template.php 1985 2007-12-26 18:11:55Z sb $
+ * @link http://www.phpunit.de/
+ * @since File available since Release 3.0.0
+ */
+
+require_once 'PHPUnit/Util/Filter.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ *
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version Release: 3.2.9
+ * @link http://www.phpunit.de/
+ * @since Class available since Release 3.0.0
+ */
+class PHPUnit_Util_Template
+{
+ /**
+ * @var string
+ * @access protected
+ */
+ protected static $date = '';
+
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $template = '';
+
+ /**
+ * @var array
+ * @access protected
+ */
+ protected $values = array();
+
+ /**
+ * Constructor.
+ *
+ * @param string $file
+ * @throws InvalidArgumentException
+ * @access public
+ */
+ public function __construct($file = '') {
+ $this->setFile($file);
+ }
+
+ /**
+ * Sets the template file.
+ *
+ * @param string $file
+ * @throws InvalidArgumentException
+ * @access public
+ */
+ public function setFile($file) {
+ if ($file != '' && file_exists($file)) {
+ $this->template = file_get_contents($file);
+ } else {
+ throw new InvalidArgumentException(
+ 'Template file could not be loaded.'
+ );
+ }
+ }
+
+ /**
+ * Sets one or more template variables.
+ *
+ * @param array $values
+ * @param boolean $merge
+ * @access public
+ */
+ public function setVar(array $values, $merge = TRUE) {
+ if (!$merge || empty($this->values)) {
+ $this->values = $values;
+ } else {
+ $this->values = array_merge($this->values, $values);
+ }
+ }
+
+ /**
+ * Renders the template and returns the result.
+ *
+ * @return string
+ * @access public
+ */
+ public function render() {
+ $keys = array();
+
+ foreach ($this->values as $key => $value) {
+ $keys[] = '{' . $key . '}';
+ }
+
+ return str_replace($keys, $this->values, $this->template);
+ }
+
+ /**
+ * Renders the template and writes the result to a file.
+ *
+ * @param string $target
+ * @access public
+ */
+ public function renderTo($target) {
+ if ($fp = @fopen($target, 'wt')) {
+ fwrite($fp, $this->render());
+ fclose($fp);
+ } else {
+ throw new RuntimeException('Could not write to ' . $target . '.');
+ }
+ }
+
+ /**
+ * Returns the cached result of date('D M j G:i:s T Y').
+ *
+ * @return string
+ * @access public
+ * @since Method available since Release 3.0.1
+ */
+ public static function getDate() {
+ if (self::$date == '') {
+ self::$date = date('D M j G:i:s T Y');
+ }
+
+ return self::$date;
+ }
+}
+?>
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/Test.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/Test.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/Test.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/Test.php Sat Aug 2 07:11:35 2008
@@ -0,0 +1,242 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Sebastian Bergmann nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id: Test.php 1997 2007-12-27 05:07:58Z sb $
+ * @link http://www.phpunit.de/
+ * @since File available since Release 3.0.0
+ */
+
+require_once 'PHPUnit/Util/Filter.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Test helpers.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version Release: 3.2.9
+ * @link http://www.phpunit.de/
+ * @since Class available since Release 3.0.0
+ */
+class PHPUnit_Util_Test
+{
+ /**
+ * @param PHPUnit_Framework_Test $test
+ * @param boolean $asString
+ * @return mixed
+ * @access public
+ * @static
+ */
+ public static function describe(PHPUnit_Framework_Test $test, $asString = TRUE)
+ {
+ if ($asString) {
+ if ($test instanceof PHPUnit_Framework_SelfDescribing) {
+ return $test->toString();
+ } else {
+ return get_class($test);
+ }
+ } else {
+ if ($test instanceof PHPUnit_Framework_TestCase) {
+ return array(
+ get_class($test), $test->getName()
+ );
+ }
+
+ else if ($test instanceof PHPUnit_Framework_SelfDescribing) {
+ return array('', $test->toString());
+ }
+
+ else {
+ return array('', get_class($test));
+ }
+ }
+ }
+
+ /**
+ * @param PHPUnit_Framework_Test $test
+ * @param PHPUnit_Framework_TestResult $result
+ * @return mixed
+ * @access public
+ * @static
+ */
+ public static function lookupResult(PHPUnit_Framework_Test $test, PHPUnit_Framework_TestResult $result)
+ {
+ $testName = self::describe($test);
+
+ foreach ($result->errors() as $error) {
+ if ($testName == self::describe($error->failedTest())) {
+ return $error;
+ }
+ }
+
+ foreach ($result->failures() as $failure) {
+ if ($testName == self::describe($failure->failedTest())) {
+ return $failure;
+ }
+ }
+
+ foreach ($result->notImplemented() as $notImplemented) {
+ if ($testName == self::describe($notImplemented->failedTest())) {
+ return $notImplemented;
+ }
+ }
+
+ foreach ($result->skipped() as $skipped) {
+ if ($testName == self::describe($skipped->failedTest())) {
+ return $skipped;
+ }
+ }
+
+ return PHPUnit_Runner_BaseTestRunner::STATUS_PASSED;
+ }
+
+ /**
+ * Returns the files and lines a test method wants to cover.
+ *
+ * @param string $className
+ * @param string $methodName
+ * @return array
+ * @access public
+ * @static
+ * @since Method available since Release 3.2.0
+ */
+ public static function getLinesToBeCovered($className, $methodName)
+ {
+ $result = array();
+
+ try {
+ $class = new ReflectionClass($className);
+ $method = new ReflectionMethod($className, $methodName);
+ $docComment = $class->getDocComment() . $method->getDocComment();
+
+ if (preg_match_all('/@covers[\s]+([\:\.\w]+)/', $docComment, $matches)) {
+ foreach ($matches[1] as $method) {
+ if (strpos($method, '::') !== FALSE) {
+ list($className, $methodName) = explode('::', $method);
+
+ $_method = new ReflectionMethod($className, $methodName);
+ $fileName = $_method->getFileName();
+ $startLine = $_method->getStartLine();
+ $endLine = $_method->getEndLine();
+
+ if (!isset($result[$fileName])) {
+ $result[$fileName] = array();
+ }
+
+ $result[$fileName] = array_merge(
+ $result[$fileName],
+ range($startLine, $endLine)
+ );
+ }
+ }
+ }
+ }
+
+ catch (ReflectionException $e) {
+ }
+
+ return $result;
+ }
+
+ /**
+ * Returns the groups for a test class or method.
+ *
+ * @param Reflector $reflector
+ * @param array $groups
+ * @return array
+ * @access public
+ * @static
+ * @since Method available since Release 3.2.0
+ */
+ public static function getGroups(Reflector $reflector, array $groups = array())
+ {
+ $docComment = $reflector->getDocComment();
+
+ if (preg_match_all('/@group[\s]+([\.\w]+)/', $docComment, $matches)) {
+ $groups = array_merge($groups, $matches[1]);
+ }
+
+ return $groups;
+ }
+
+ /**
+ * Returns the provided data for a method.
+ *
+ * @param string $className
+ * @param string $methodName
+ * @return array
+ * @access public
+ * @static
+ * @since Method available since Release 3.2.0
+ */
+ public static function getProvidedData($className, $methodName)
+ {
+ $method = new ReflectionMethod($className, $methodName);
+ $docComment = $method->getDocComment();
+
+ if (preg_match('/@dataProvider[\s]+([:\.\w]+)/', $docComment, $matches)) {
+ try {
+ $dataProvider = explode('::', $matches[1]);
+ $dataProviderMethodName = array_pop($dataProvider);
+
+ if (!empty($dataProvider)) {
+ $dataProviderClassName = join('::', $dataProvider);
+ } else {
+ $dataProviderClassName = $className;
+ }
+
+ $dataProviderMethod = new ReflectionMethod(
+ $dataProviderClassName, $dataProviderMethodName
+ );
+
+ return $dataProviderMethod->invoke(NULL);
+ }
+
+ catch (ReflectionException $e) {
+ }
+ }
+ }
+}
+?>
Added: incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/NamePrettifier.php
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/NamePrettifier.php?rev=681982&view=auto
==============================================================================
--- incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/NamePrettifier.php (added)
+++ incubator/shindig/trunk/php/external/PHPUnit/Util/TestDox/NamePrettifier.php Sat Aug 2 07:11:35 2008
@@ -0,0 +1,187 @@
+<?php
+/**
+ * PHPUnit
+ *
+ * Copyright (c) 2002-2008, Sebastian Bergmann <sb...@sebastian-bergmann.de>.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * * Neither the name of Sebastian Bergmann nor the names of his
+ * contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version SVN: $Id: NamePrettifier.php 1985 2007-12-26 18:11:55Z sb $
+ * @link http://www.phpunit.de/
+ * @since File available since Release 2.3.0
+ */
+
+require_once 'PHPUnit/Util/Filter.php';
+
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+
+/**
+ * Prettifies class and method names for use in TestDox documentation.
+ *
+ * @category Testing
+ * @package PHPUnit
+ * @author Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @copyright 2002-2008 Sebastian Bergmann <sb...@sebastian-bergmann.de>
+ * @license http://www.opensource.org/licenses/bsd-license.php BSD License
+ * @version Release: 3.2.9
+ * @link http://www.phpunit.de/
+ * @since Class available since Release 2.1.0
+ */
+class PHPUnit_Util_TestDox_NamePrettifier
+{
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $prefix = 'Test';
+
+ /**
+ * @var string
+ * @access protected
+ */
+ protected $suffix = 'Test';
+
+ /**
+ * @var array
+ * @access protected
+ */
+ protected $strings = array();
+
+ /**
+ * Prettifies the name of a test class.
+ *
+ * @param string $testClassName
+ * @return string
+ * @access public
+ */
+ public function prettifyTestClass($testClassName)
+ {
+ $title = $testClassName;
+
+ if ($this->suffix !== NULL &&
+ $this->suffix == substr($testClassName, -1 * strlen($this->suffix))) {
+ $title = substr($title, 0, strripos($title, $this->suffix));
+ }
+
+ if ($this->prefix !== NULL &&
+ $this->prefix == substr($testClassName, 0, strlen($this->prefix))) {
+ $title = substr($title, strlen($this->prefix));
+ }
+
+ return $title;
+ }
+
+ /**
+ * Prettifies the name of a test method.
+ *
+ * @param string $testMethodName
+ * @return string
+ * @access public
+ */
+ public function prettifyTestMethod($testMethodName)
+ {
+ $buffer = '';
+
+ if (!is_string($testMethodName) || strlen($testMethodName) == 0) {
+ return $buffer;
+ }
+
+ $string = preg_replace('#\d+$#', '', $testMethodName);
+
+ if (in_array($string, $this->strings)) {
+ $testMethodName = $string;
+ } else {
+ $this->strings[] = $string;
+ }
+
+ $max = strlen($testMethodName);
+
+ if (substr($testMethodName, 0, 4) == 'test') {
+ $offset = 4;
+ } else {
+ $offset = 0;
+ $testMethodName[0] = strtoupper($testMethodName[0]);
+ }
+
+ $wasNumeric = FALSE;
+
+ for ($i = $offset; $i < $max; $i++) {
+ if ($i > $offset &&
+ ord($testMethodName[$i]) >= 65 &&
+ ord($testMethodName[$i]) <= 90) {
+ $buffer .= ' ' . strtolower($testMethodName[$i]);
+ } else {
+ $isNumeric = is_numeric($testMethodName[$i]);
+
+ if (!$wasNumeric && $isNumeric) {
+ $buffer .= ' ';
+ $wasNumeric = TRUE;
+ }
+
+ if ($wasNumeric && !$isNumeric) {
+ $wasNumeric = FALSE;
+ }
+
+ $buffer .= $testMethodName[$i];
+ }
+ }
+
+ return $buffer;
+ }
+
+ /**
+ * Sets the prefix of test names.
+ *
+ * @param string $prefix
+ * @access public
+ */
+ public function setPrefix($prefix)
+ {
+ $this->prefix = $prefix;
+ }
+
+ /**
+ * Sets the suffix of test names.
+ *
+ * @param string $prefix
+ * @access public
+ */
+ public function setSuffix($suffix)
+ {
+ $this->suffix = $suffix;
+ }
+}
+?>