<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
    <title>PHPXRef 0.7.1 : Unnamed Project : /tests/simpletest/docs/fr/web_tester_documentation.html source</title>
    <link rel="stylesheet" href="../../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../../sample-print.css" type="text/css" media="print">
    <style id="hilight" type="text/css"></style>
    <meta http-equiv="content-type" content="text/html;charset=iso-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
	<tr>
        <td valign="top" class="pagetitle">
            [ <a href="../../../../index.html">Index</a> ]
        </td>
        <td align="right" class="pagetitle">
		    <h2 style="margin-bottom: 0px">PHP Cross Reference of Unnamed Project</h2>
	    </td>
    </tr>
</table>


<!-- Generated by PHPXref 0.7.1 at Thu Oct 23 18:57:41 2014 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->

<script src="../../../../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../../../../';
subdir='tests/simpletest/docs/fr';
filename='web_tester_documentation.html.source.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);

// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
  document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
  document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../../../../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
<script language="JavaScript" type="text/javascript">
<!--

document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');

document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../../../../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../../../../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../../../../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../../../../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../../../../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h2 class="listing-heading"><a href="./index.html">/tests/simpletest/docs/fr/</a> -> <a href="web_tester_documentation.html.html">web_tester_documentation.html</a> (source)</h2>
<div class="listing">
<p class="viewlinks">[<a href="web_tester_documentation.html.html">Summary view</a>]
[<a href="javascript:window.print();">Print</a>]
[<a href="web_tester_documentation.html.source.txt" target="_new">Text view</a>]
</p>
<pre>
<a name="l1"><span class="linenum">   1</span></a>  &lt;html&gt;
<a name="l2"><span class="linenum">   2</span></a>  &lt;head&gt;
<a name="l3"><span class="linenum">   3</span></a>  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot;&gt;
<a name="l4"><span class="linenum">   4</span></a>  &lt;title&gt;Documentation SimpleTest : tester des scripts web&lt;/title&gt;
<a name="l5"><span class="linenum">   5</span></a>  &lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;docs.css&quot; title=&quot;Styles&quot;&gt;
<a name="l6"><span class="linenum">   6</span></a>  &lt;/head&gt;
<a name="l7"><span class="linenum">   7</span></a>  &lt;body&gt;
<a name="l8"><span class="linenum">   8</span></a>  &lt;div class=&quot;menu_back&quot;&gt;&lt;div class=&quot;menu&quot;&gt;
<a name="l9"><span class="linenum">   9</span></a>  &lt;a href=&quot;index.html&quot;&gt;SimpleTest&lt;/a&gt;
<a name="l10"><span class="linenum">  10</span></a>                  |
<a name="l11"><span class="linenum">  11</span></a>                  &lt;a href=&quot;overview.html&quot;&gt;Overview&lt;/a&gt;
<a name="l12"><span class="linenum">  12</span></a>                  |
<a name="l13"><span class="linenum">  13</span></a>                  &lt;a href=&quot;unit_test_documentation.html&quot;&gt;Unit tester&lt;/a&gt;
<a name="l14"><span class="linenum">  14</span></a>                  |
<a name="l15"><span class="linenum">  15</span></a>                  &lt;a href=&quot;group_test_documentation.html&quot;&gt;Group tests&lt;/a&gt;
<a name="l16"><span class="linenum">  16</span></a>                  |
<a name="l17"><span class="linenum">  17</span></a>                  &lt;a href=&quot;mock_objects_documentation.html&quot;&gt;Mock objects&lt;/a&gt;
<a name="l18"><span class="linenum">  18</span></a>                  |
<a name="l19"><span class="linenum">  19</span></a>                  &lt;a href=&quot;partial_mocks_documentation.html&quot;&gt;Partial mocks&lt;/a&gt;
<a name="l20"><span class="linenum">  20</span></a>                  |
<a name="l21"><span class="linenum">  21</span></a>                  &lt;a href=&quot;reporter_documentation.html&quot;&gt;Reporting&lt;/a&gt;
<a name="l22"><span class="linenum">  22</span></a>                  |
<a name="l23"><span class="linenum">  23</span></a>                  &lt;a href=&quot;expectation_documentation.html&quot;&gt;Expectations&lt;/a&gt;
<a name="l24"><span class="linenum">  24</span></a>                  |
<a name="l25"><span class="linenum">  25</span></a>                  &lt;a href=&quot;web_tester_documentation.html&quot;&gt;Web tester&lt;/a&gt;
<a name="l26"><span class="linenum">  26</span></a>                  |
<a name="l27"><span class="linenum">  27</span></a>                  &lt;a href=&quot;form_testing_documentation.html&quot;&gt;Testing forms&lt;/a&gt;
<a name="l28"><span class="linenum">  28</span></a>                  |
<a name="l29"><span class="linenum">  29</span></a>                  &lt;a href=&quot;authentication_documentation.html&quot;&gt;Authentication&lt;/a&gt;
<a name="l30"><span class="linenum">  30</span></a>                  |
<a name="l31"><span class="linenum">  31</span></a>                  &lt;a href=&quot;browser_documentation.html&quot;&gt;Scriptable browser&lt;/a&gt;
<a name="l32"><span class="linenum">  32</span></a>  &lt;/div&gt;&lt;/div&gt;
<a name="l33"><span class="linenum">  33</span></a>  &lt;h1&gt;Documentation sur le testeur web&lt;/h1&gt;
<a name="l34"><span class="linenum">  34</span></a>          This page...
<a name="l35"><span class="linenum">  35</span></a>          &lt;ul&gt;
<a name="l36"><span class="linenum">  36</span></a>  &lt;li&gt;
<a name="l37"><span class="linenum">  37</span></a>              Réussir à &lt;a href=&quot;#telecharger&quot;&gt;télécharger une page web&lt;/a&gt;
<a name="l38"><span class="linenum">  38</span></a>          &lt;/li&gt;
<a name="l39"><span class="linenum">  39</span></a>  &lt;li&gt;
<a name="l40"><span class="linenum">  40</span></a>              Tester le &lt;a href=&quot;#contenu&quot;&gt;contenu de la page&lt;/a&gt;
<a name="l41"><span class="linenum">  41</span></a>          &lt;/li&gt;
<a name="l42"><span class="linenum">  42</span></a>  &lt;li&gt;
<a name="l43"><span class="linenum">  43</span></a>              &lt;a href=&quot;#navigation&quot;&gt;Naviguer sur un site web&lt;/a&gt; pendant le test
<a name="l44"><span class="linenum">  44</span></a>          &lt;/li&gt;
<a name="l45"><span class="linenum">  45</span></a>  &lt;li&gt;
<a name="l46"><span class="linenum">  46</span></a>              Méthodes pour &lt;a href=&quot;#requete&quot;&gt;modifier une requête&lt;/a&gt; et pour déboguer
<a name="l47"><span class="linenum">  47</span></a>          &lt;/li&gt;
<a name="l48"><span class="linenum">  48</span></a>  &lt;/ul&gt;
<a name="l49"><span class="linenum">  49</span></a>  &lt;div class=&quot;content&quot;&gt;
<a name="l50"><span class="linenum">  50</span></a>          &lt;h2&gt;
<a name="l51"><span class="linenum">  51</span></a>  &lt;a class=&quot;target&quot; name=&quot;telecharger&quot;&gt;&lt;/a&gt;Télécharger une page&lt;/h2&gt;
<a name="l52"><span class="linenum">  52</span></a>              &lt;p&gt;
<a name="l53"><span class="linenum">  53</span></a>                  Tester des classes c'est très bien.
<a name="l54"><span class="linenum">  54</span></a>                  Reste que PHP est avant tout un langage
<a name="l55"><span class="linenum">  55</span></a>                  pour créer des fonctionnalités à l'intérieur de pages web.
<a name="l56"><span class="linenum">  56</span></a>                  Comment pouvons tester la partie de devant
<a name="l57"><span class="linenum">  57</span></a>                  -- celle de l'interface -- dans nos applications en PHP ?
<a name="l58"><span class="linenum">  58</span></a>                  Etant donné qu'une page web n'est constituée que de texte,
<a name="l59"><span class="linenum">  59</span></a>                  nous devrions pouvoir les examiner exactement
<a name="l60"><span class="linenum">  60</span></a>                  comme n'importe quelle autre donnée de test.
<a name="l61"><span class="linenum">  61</span></a>              &lt;/p&gt;
<a name="l62"><span class="linenum">  62</span></a>              &lt;p&gt;
<a name="l63"><span class="linenum">  63</span></a>                  Cela nous amène à une situation délicate.
<a name="l64"><span class="linenum">  64</span></a>                  Si nous testons dans un niveau trop bas,
<a name="l65"><span class="linenum">  65</span></a>                  vérifier des balises avec un motif ad hoc par exemple,
<a name="l66"><span class="linenum">  66</span></a>                  nos tests seront trop fragiles. Le moindre changement
<a name="l67"><span class="linenum">  67</span></a>                  dans la présentation pourrait casser un grand nombre de test.
<a name="l68"><span class="linenum">  68</span></a>                  Si nos tests sont situés trop haut, en utilisant
<a name="l69"><span class="linenum">  69</span></a>                  une version fantaisie du moteur de template pour
<a name="l70"><span class="linenum">  70</span></a>                  donner un cas précis, alors nous perdons complètement
<a name="l71"><span class="linenum">  71</span></a>                  la capacité à automatiser certaines classes de test.
<a name="l72"><span class="linenum">  72</span></a>                  Par exemple, l'interaction entre des formulaires
<a name="l73"><span class="linenum">  73</span></a>                  et la navigation devra être testé manuellement.
<a name="l74"><span class="linenum">  74</span></a>                  Ces types de test sont extrêmement fastidieux
<a name="l75"><span class="linenum">  75</span></a>                  et plutôt sensibles aux erreurs.
<a name="l76"><span class="linenum">  76</span></a>              &lt;/p&gt;
<a name="l77"><span class="linenum">  77</span></a>              &lt;p&gt;
<a name="l78"><span class="linenum">  78</span></a>                  SimpleTest comprend une forme spéciale de scénario
<a name="l79"><span class="linenum">  79</span></a>                  de test pour tester les actions d'une page web.
<a name="l80"><span class="linenum">  80</span></a>                  &lt;span class=&quot;new_code&quot;&gt;WebTestCase&lt;/span&gt; inclut des facilités pour la navigation,
<a name="l81"><span class="linenum">  81</span></a>                  des vérifications sur le contenu
<a name="l82"><span class="linenum">  82</span></a>                  et les cookies ainsi que la gestion des formulaires.
<a name="l83"><span class="linenum">  83</span></a>                  Utiliser ces scénarios de test ressemble
<a name="l84"><span class="linenum">  84</span></a>                  fortement à &lt;span class=&quot;new_code&quot;&gt;UnitTestCase&lt;/span&gt;...
<a name="l85"><span class="linenum">  85</span></a>  &lt;pre&gt;
<a name="l86"><span class="linenum">  86</span></a>  &lt;strong&gt;<span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l87"><span class="linenum">  87</span></a>  }&lt;/strong&gt;
<a name="l88"><span class="linenum">  88</span></a>  &lt;/pre&gt;
<a name="l89"><span class="linenum">  89</span></a>                  Ici nous sommes sur le point de tester
<a name="l90"><span class="linenum">  90</span></a>                  le site de &lt;a href=&quot;http://www.lastcraft.com/&quot;&gt;Last Craft&lt;/a&gt;.
<a name="l91"><span class="linenum">  91</span></a>                  Si ce scénario de test est situé dans un fichier appelé
<a name="l92"><span class="linenum">  92</span></a>                  &lt;em&gt;lastcraft_test.php&lt;/em&gt; alors il peut être chargé
<a name="l93"><span class="linenum">  93</span></a>                  dans un script de lancement tout comme des tests unitaires...
<a name="l94"><span class="linenum">  94</span></a>  &lt;pre&gt;
<a name="l95"><span class="linenum">  95</span></a>  &amp;lt;?php
<a name="l96"><span class="linenum">  96</span></a>  require_once('simpletest/autorun.php');&lt;strong&gt;
<a name="l97"><span class="linenum">  97</span></a>  require_once('simpletest/web_tester.php');&lt;/strong&gt;
<a name="l98"><span class="linenum">  98</span></a>  <a class="class" onClick="logClass('SimpleTest')" href="../../../../_classes/simpletest.html" onMouseOver="classPopup(event,'simpletest')">SimpleTest</a>::<a class="function" onClick="logFunction('prefer')" href="../../../../_functions/prefer.html" onMouseOver="funcPopup(event,'prefer')">prefer</a>(<span class="keyword">new </span><a class="class" onClick="logClass('TextReporter')" href="../../../../_classes/textreporter.html" onMouseOver="classPopup(event,'textreporter')">TextReporter</a>());
<a name="l99"><span class="linenum">  99</span></a>  
<a name="l100"><span class="linenum"> 100</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('WebTests')" href="../../../../_classes/webtests.html" onMouseOver="classPopup(event,'webtests')">WebTests</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('TestSuite')" href="../../../../_classes/testsuite.html" onMouseOver="classPopup(event,'testsuite')">TestSuite</a> {
<a name="l101"><span class="linenum"> 101</span></a>      function <a class="function" onClick="logFunction('WebTests')" href="../../../../_functions/webtests.html" onMouseOver="funcPopup(event,'webtests')">WebTests</a>() {
<a name="l102"><span class="linenum"> 102</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('TestSuite')" href="../../../../_functions/testsuite.html" onMouseOver="funcPopup(event,'testsuite')">TestSuite</a>('Web site tests');&lt;strong&gt;
<a name="l103"><span class="linenum"> 103</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('addFile')" href="../../../../_functions/addfile.html" onMouseOver="funcPopup(event,'addfile')">addFile</a>('lastcraft_test.php');&lt;/strong&gt;
<a name="l104"><span class="linenum"> 104</span></a>      }
<a name="l105"><span class="linenum"> 105</span></a>  }
<a name="l106"><span class="linenum"> 106</span></a>  ?&amp;gt;
<a name="l107"><span class="linenum"> 107</span></a>  &lt;/pre&gt;
<a name="l108"><span class="linenum"> 108</span></a>                  J'utilise ici le rapporteur en mode texte
<a name="l109"><span class="linenum"> 109</span></a>                  pour mieux distinguer le contenu au format HTML
<a name="l110"><span class="linenum"> 110</span></a>                  du résultat du test proprement dit.
<a name="l111"><span class="linenum"> 111</span></a>              &lt;/p&gt;
<a name="l112"><span class="linenum"> 112</span></a>              &lt;p&gt;
<a name="l113"><span class="linenum"> 113</span></a>                  Rien n'est encore testé. Nous pouvons télécharger
<a name="l114"><span class="linenum"> 114</span></a>                  la page d'accueil en utilisant la méthode &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>()&lt;/span&gt;...
<a name="l115"><span class="linenum"> 115</span></a>  &lt;pre&gt;
<a name="l116"><span class="linenum"> 116</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l117"><span class="linenum"> 117</span></a>      &lt;strong&gt;
<a name="l118"><span class="linenum"> 118</span></a>      function <a class="function" onClick="logFunction('testHomepage')" href="../../../../_functions/testhomepage.html" onMouseOver="funcPopup(event,'testhomepage')">testHomepage</a>() {
<a name="l119"><span class="linenum"> 119</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertTrue')" href="../../../../_functions/asserttrue.html" onMouseOver="funcPopup(event,'asserttrue')">assertTrue</a>(<a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://www.lastcraft.com/'));
<a name="l120"><span class="linenum"> 120</span></a>      }&lt;/strong&gt;
<a name="l121"><span class="linenum"> 121</span></a>  }
<a name="l122"><span class="linenum"> 122</span></a>  &lt;/pre&gt;
<a name="l123"><span class="linenum"> 123</span></a>                  La méthode &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>()&lt;/span&gt; renverra &quot;true&quot;
<a name="l124"><span class="linenum"> 124</span></a>                  uniquement si le contenu de la page a bien été téléchargé.
<a name="l125"><span class="linenum"> 125</span></a>                  C'est un moyen simple, mais efficace pour vérifier
<a name="l126"><span class="linenum"> 126</span></a>                  qu'une page web a bien été délivré par le serveur web.
<a name="l127"><span class="linenum"> 127</span></a>                  Cependant le contenu peut révéler être une erreur 404
<a name="l128"><span class="linenum"> 128</span></a>                  et dans ce cas notre méthode &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>()&lt;/span&gt; renverrait encore un succès.
<a name="l129"><span class="linenum"> 129</span></a>              &lt;/p&gt;
<a name="l130"><span class="linenum"> 130</span></a>              &lt;p&gt;
<a name="l131"><span class="linenum"> 131</span></a>                  En supposant que le serveur web pour le site Last Craft
<a name="l132"><span class="linenum"> 132</span></a>                  soit opérationnel (malheureusement ce n'est pas toujours le cas),
<a name="l133"><span class="linenum"> 133</span></a>                  nous devrions voir...
<a name="l134"><span class="linenum"> 134</span></a>  &lt;pre class=&quot;shell&quot;&gt;
<a name="l135"><span class="linenum"> 135</span></a>  Web site tests
<a name="l136"><span class="linenum"> 136</span></a>  OK
<a name="l137"><span class="linenum"> 137</span></a>  Test cases run: 1/1, Failures: 0, Exceptions: 0
<a name="l138"><span class="linenum"> 138</span></a>  &lt;/pre&gt;
<a name="l139"><span class="linenum"> 139</span></a>                  Nous avons vérifié qu'une page, de n'importe quel type,
<a name="l140"><span class="linenum"> 140</span></a>                  a bien été renvoyée. Nous ne savons pas encore
<a name="l141"><span class="linenum"> 141</span></a>                  s'il s'agit de celle que nous souhaitions.
<a name="l142"><span class="linenum"> 142</span></a>              &lt;/p&gt;
<a name="l143"><span class="linenum"> 143</span></a>          
<a name="l144"><span class="linenum"> 144</span></a>          &lt;h2&gt;
<a name="l145"><span class="linenum"> 145</span></a>  &lt;a class=&quot;target&quot; name=&quot;contenu&quot;&gt;&lt;/a&gt;Tester le contenu d'une page&lt;/h2&gt;
<a name="l146"><span class="linenum"> 146</span></a>              &lt;p&gt;
<a name="l147"><span class="linenum"> 147</span></a>                  Pour obtenir la confirmation que la page téléchargée
<a name="l148"><span class="linenum"> 148</span></a>                  est bien celle que nous attendions,
<a name="l149"><span class="linenum"> 149</span></a>                  nous devons vérifier son contenu.
<a name="l150"><span class="linenum"> 150</span></a>  &lt;pre&gt;
<a name="l151"><span class="linenum"> 151</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l152"><span class="linenum"> 152</span></a>      
<a name="l153"><span class="linenum"> 153</span></a>      function <a class="function" onClick="logFunction('testHomepage')" href="../../../../_functions/testhomepage.html" onMouseOver="funcPopup(event,'testhomepage')">testHomepage</a>() {&lt;strong&gt;
<a name="l154"><span class="linenum"> 154</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://www.lastcraft.com/');
<a name="l155"><span class="linenum"> 155</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;assertWantedPattern('/why the last craft/i');&lt;/strong&gt;
<a name="l156"><span class="linenum"> 156</span></a>      }
<a name="l157"><span class="linenum"> 157</span></a>  }
<a name="l158"><span class="linenum"> 158</span></a>  &lt;/pre&gt;
<a name="l159"><span class="linenum"> 159</span></a>                  La page obtenue par le dernier téléchargement est
<a name="l160"><span class="linenum"> 160</span></a>                  placée dans un buffer au sein même du scénario de test.
<a name="l161"><span class="linenum"> 161</span></a>                  Il n'est donc pas nécessaire de s'y référer directement.
<a name="l162"><span class="linenum"> 162</span></a>                  La correspondance du motif est toujours effectuée
<a name="l163"><span class="linenum"> 163</span></a>                  par rapport à ce buffer.
<a name="l164"><span class="linenum"> 164</span></a>              &lt;/p&gt;
<a name="l165"><span class="linenum"> 165</span></a>              &lt;p&gt;
<a name="l166"><span class="linenum"> 166</span></a>                  Voici une liste possible d'assertions sur le contenu...
<a name="l167"><span class="linenum"> 167</span></a>                  &lt;table&gt;&lt;tbody&gt;
<a name="l168"><span class="linenum"> 168</span></a>                      &lt;tr&gt;
<a name="l169"><span class="linenum"> 169</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;assertWantedPattern(<a class="var it943" onMouseOver="hilite(943)" onMouseOut="lolite()" onClick="logVariable('pattern')" href="../../../../_variables/pattern.html">$pattern</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l170"><span class="linenum"> 170</span></a>  &lt;td&gt;Vérifier une correspondance sur le contenu via une expression rationnelle Perl&lt;/td&gt;
<a name="l171"><span class="linenum"> 171</span></a>  &lt;/tr&gt;
<a name="l172"><span class="linenum"> 172</span></a>                      &lt;tr&gt;
<a name="l173"><span class="linenum"> 173</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;assertNoUnwantedPattern(<a class="var it943" onMouseOver="hilite(943)" onMouseOut="lolite()" onClick="logVariable('pattern')" href="../../../../_variables/pattern.html">$pattern</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l174"><span class="linenum"> 174</span></a>  &lt;td&gt;Une expression rationnelle Perl pour vérifier une absence&lt;/td&gt;
<a name="l175"><span class="linenum"> 175</span></a>  &lt;/tr&gt;
<a name="l176"><span class="linenum"> 176</span></a>                      &lt;tr&gt;
<a name="l177"><span class="linenum"> 177</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertTitle')" href="../../../../_functions/asserttitle.html" onMouseOver="funcPopup(event,'asserttitle')">assertTitle</a>(<a class="var it756" onMouseOver="hilite(756)" onMouseOut="lolite()" onClick="logVariable('title')" href="../../../../_variables/title.html">$title</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l178"><span class="linenum"> 178</span></a>  &lt;td&gt;Passe si le titre de la page correspond exactement&lt;/td&gt;
<a name="l179"><span class="linenum"> 179</span></a>  &lt;/tr&gt;
<a name="l180"><span class="linenum"> 180</span></a>                      &lt;tr&gt;
<a name="l181"><span class="linenum"> 181</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertLink')" href="../../../../_functions/assertlink.html" onMouseOver="funcPopup(event,'assertlink')">assertLink</a>(<a class="var it106" onMouseOver="hilite(106)" onMouseOut="lolite()" onClick="logVariable('label')" href="../../../../_variables/label.html">$label</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l182"><span class="linenum"> 182</span></a>  &lt;td&gt;Passe si un lien avec ce texte est présent&lt;/td&gt;
<a name="l183"><span class="linenum"> 183</span></a>  &lt;/tr&gt;
<a name="l184"><span class="linenum"> 184</span></a>                      &lt;tr&gt;
<a name="l185"><span class="linenum"> 185</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertNoLink')" href="../../../../_functions/assertnolink.html" onMouseOver="funcPopup(event,'assertnolink')">assertNoLink</a>(<a class="var it106" onMouseOver="hilite(106)" onMouseOut="lolite()" onClick="logVariable('label')" href="../../../../_variables/label.html">$label</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l186"><span class="linenum"> 186</span></a>  &lt;td&gt;Passe si aucun lien avec ce texte est présent&lt;/td&gt;
<a name="l187"><span class="linenum"> 187</span></a>  &lt;/tr&gt;
<a name="l188"><span class="linenum"> 188</span></a>                      &lt;tr&gt;
<a name="l189"><span class="linenum"> 189</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertLinkById')" href="../../../../_functions/assertlinkbyid.html" onMouseOver="funcPopup(event,'assertlinkbyid')">assertLinkById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l190"><span class="linenum"> 190</span></a>  &lt;td&gt;Passe si un lien avec cet attribut d'identification est présent&lt;/td&gt;
<a name="l191"><span class="linenum"> 191</span></a>  &lt;/tr&gt;
<a name="l192"><span class="linenum"> 192</span></a>                      &lt;tr&gt;
<a name="l193"><span class="linenum"> 193</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertField')" href="../../../../_functions/assertfield.html" onMouseOver="funcPopup(event,'assertfield')">assertField</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it67" onMouseOver="hilite(67)" onMouseOut="lolite()" onClick="logVariable('value')" href="../../../../_variables/value.html">$value</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l194"><span class="linenum"> 194</span></a>  &lt;td&gt;Passe si une balise input avec ce nom contient cette valeur&lt;/td&gt;
<a name="l195"><span class="linenum"> 195</span></a>  &lt;/tr&gt;
<a name="l196"><span class="linenum"> 196</span></a>                      &lt;tr&gt;
<a name="l197"><span class="linenum"> 197</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertFieldById')" href="../../../../_functions/assertfieldbyid.html" onMouseOver="funcPopup(event,'assertfieldbyid')">assertFieldById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>, <a class="var it67" onMouseOver="hilite(67)" onMouseOut="lolite()" onClick="logVariable('value')" href="../../../../_variables/value.html">$value</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l198"><span class="linenum"> 198</span></a>  &lt;td&gt;Passe si une balise input avec cet identifiant contient cette valeur&lt;/td&gt;
<a name="l199"><span class="linenum"> 199</span></a>  &lt;/tr&gt;
<a name="l200"><span class="linenum"> 200</span></a>                      &lt;tr&gt;
<a name="l201"><span class="linenum"> 201</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertResponse')" href="../../../../_functions/assertresponse.html" onMouseOver="funcPopup(event,'assertresponse')">assertResponse</a>(<a class="var it944" onMouseOver="hilite(944)" onMouseOut="lolite()" onClick="logVariable('codes')" href="../../../../_variables/codes.html">$codes</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l202"><span class="linenum"> 202</span></a>  &lt;td&gt;Passe si la réponse HTTP trouve une correspondance dans la liste&lt;/td&gt;
<a name="l203"><span class="linenum"> 203</span></a>  &lt;/tr&gt;
<a name="l204"><span class="linenum"> 204</span></a>                      &lt;tr&gt;
<a name="l205"><span class="linenum"> 205</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertMime')" href="../../../../_functions/assertmime.html" onMouseOver="funcPopup(event,'assertmime')">assertMime</a>(<a class="var it945" onMouseOver="hilite(945)" onMouseOut="lolite()" onClick="logVariable('types')" href="../../../../_variables/types.html">$types</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l206"><span class="linenum"> 206</span></a>  &lt;td&gt;Passe si le type MIME se retrouve dans cette liste&lt;/td&gt;
<a name="l207"><span class="linenum"> 207</span></a>  &lt;/tr&gt;
<a name="l208"><span class="linenum"> 208</span></a>                      &lt;tr&gt;
<a name="l209"><span class="linenum"> 209</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertAuthentication')" href="../../../../_functions/assertauthentication.html" onMouseOver="funcPopup(event,'assertauthentication')">assertAuthentication</a>(<a class="var it197" onMouseOver="hilite(197)" onMouseOut="lolite()" onClick="logVariable('protocol')" href="../../../../_variables/protocol.html">$protocol</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l210"><span class="linenum"> 210</span></a>  &lt;td&gt;Passe si l'authentification provoquée est de ce type de protocole&lt;/td&gt;
<a name="l211"><span class="linenum"> 211</span></a>  &lt;/tr&gt;
<a name="l212"><span class="linenum"> 212</span></a>                      &lt;tr&gt;
<a name="l213"><span class="linenum"> 213</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertNoAuthentication')" href="../../../../_functions/assertnoauthentication.html" onMouseOver="funcPopup(event,'assertnoauthentication')">assertNoAuthentication</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l214"><span class="linenum"> 214</span></a>  &lt;td&gt;Passe s'il n'y pas d'authentification provoquée en cours&lt;/td&gt;
<a name="l215"><span class="linenum"> 215</span></a>  &lt;/tr&gt;
<a name="l216"><span class="linenum"> 216</span></a>                      &lt;tr&gt;
<a name="l217"><span class="linenum"> 217</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertRealm')" href="../../../../_functions/assertrealm.html" onMouseOver="funcPopup(event,'assertrealm')">assertRealm</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l218"><span class="linenum"> 218</span></a>  &lt;td&gt;Passe si le domaine provoqué correspond&lt;/td&gt;
<a name="l219"><span class="linenum"> 219</span></a>  &lt;/tr&gt;
<a name="l220"><span class="linenum"> 220</span></a>                      &lt;tr&gt;
<a name="l221"><span class="linenum"> 221</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertHeader')" href="../../../../_functions/assertheader.html" onMouseOver="funcPopup(event,'assertheader')">assertHeader</a>(<a class="var it251" onMouseOver="hilite(251)" onMouseOut="lolite()" onClick="logVariable('header')" href="../../../../_variables/header.html">$header</a>, <a class="var it603" onMouseOver="hilite(603)" onMouseOut="lolite()" onClick="logVariable('content')" href="../../../../_variables/content.html">$content</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l222"><span class="linenum"> 222</span></a>  &lt;td&gt;Passe si une entête téléchargée correspond à cette valeur&lt;/td&gt;
<a name="l223"><span class="linenum"> 223</span></a>  &lt;/tr&gt;
<a name="l224"><span class="linenum"> 224</span></a>                      &lt;tr&gt;
<a name="l225"><span class="linenum"> 225</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;assertNoUnwantedHeader(<a class="var it251" onMouseOver="hilite(251)" onMouseOut="lolite()" onClick="logVariable('header')" href="../../../../_variables/header.html">$header</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l226"><span class="linenum"> 226</span></a>  &lt;td&gt;Passe si une entête n'a pas été téléchargé&lt;/td&gt;
<a name="l227"><span class="linenum"> 227</span></a>  &lt;/tr&gt;
<a name="l228"><span class="linenum"> 228</span></a>                      &lt;tr&gt;
<a name="l229"><span class="linenum"> 229</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;assertHeaderPattern(<a class="var it251" onMouseOver="hilite(251)" onMouseOut="lolite()" onClick="logVariable('header')" href="../../../../_variables/header.html">$header</a>, <a class="var it943" onMouseOver="hilite(943)" onMouseOut="lolite()" onClick="logVariable('pattern')" href="../../../../_variables/pattern.html">$pattern</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l230"><span class="linenum"> 230</span></a>  &lt;td&gt;Passe si une entête téléchargée correspond à cette expression rationnelle Perl&lt;/td&gt;
<a name="l231"><span class="linenum"> 231</span></a>  &lt;/tr&gt;
<a name="l232"><span class="linenum"> 232</span></a>                      &lt;tr&gt;
<a name="l233"><span class="linenum"> 233</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertCookie')" href="../../../../_functions/assertcookie.html" onMouseOver="funcPopup(event,'assertcookie')">assertCookie</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it67" onMouseOver="hilite(67)" onMouseOut="lolite()" onClick="logVariable('value')" href="../../../../_variables/value.html">$value</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l234"><span class="linenum"> 234</span></a>  &lt;td&gt;Passe s'il existe un cookie correspondant&lt;/td&gt;
<a name="l235"><span class="linenum"> 235</span></a>  &lt;/tr&gt;
<a name="l236"><span class="linenum"> 236</span></a>                      &lt;tr&gt;
<a name="l237"><span class="linenum"> 237</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('assertNoCookie')" href="../../../../_functions/assertnocookie.html" onMouseOver="funcPopup(event,'assertnocookie')">assertNoCookie</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l238"><span class="linenum"> 238</span></a>  &lt;td&gt;Passe s'il n'y a pas de cookie avec un tel nom&lt;/td&gt;
<a name="l239"><span class="linenum"> 239</span></a>  &lt;/tr&gt;
<a name="l240"><span class="linenum"> 240</span></a>                  &lt;/tbody&gt;&lt;/table&gt;
<a name="l241"><span class="linenum"> 241</span></a>                  Comme d'habitude avec les assertions de SimpleTest,
<a name="l242"><span class="linenum"> 242</span></a>                  elles renvoient toutes &quot;false&quot; en cas d'échec
<a name="l243"><span class="linenum"> 243</span></a>                  et &quot;true&quot; si c'est un succès.
<a name="l244"><span class="linenum"> 244</span></a>                  Elles renvoient aussi un message de test optionnel :
<a name="l245"><span class="linenum"> 245</span></a>                  vous pouvez l'ajouter dans votre propre message en utilisant &quot;%s&quot;.
<a name="l246"><span class="linenum"> 246</span></a>              &lt;/p&gt;
<a name="l247"><span class="linenum"> 247</span></a>              &lt;p&gt;
<a name="l248"><span class="linenum"> 248</span></a>                  A présent nous pourrions effectué le test sur le titre uniquement...
<a name="l249"><span class="linenum"> 249</span></a>  &lt;pre&gt;
<a name="l250"><span class="linenum"> 250</span></a>  &lt;strong&gt;<a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertTitle')" href="../../../../_functions/asserttitle.html" onMouseOver="funcPopup(event,'asserttitle')">assertTitle</a>('The Last Craft?');&lt;/strong&gt;
<a name="l251"><span class="linenum"> 251</span></a>  &lt;/pre&gt;
<a name="l252"><span class="linenum"> 252</span></a>                  En plus d'une simple vérification sur le contenu HTML,
<a name="l253"><span class="linenum"> 253</span></a>                  nous pouvons aussi vérifier que le type MIME est bien d'un type acceptable...
<a name="l254"><span class="linenum"> 254</span></a>  &lt;pre&gt;
<a name="l255"><span class="linenum"> 255</span></a>  &lt;strong&gt;<a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertMime')" href="../../../../_functions/assertmime.html" onMouseOver="funcPopup(event,'assertmime')">assertMime</a>(array('text/plain', 'text/html'));&lt;/strong&gt;
<a name="l256"><span class="linenum"> 256</span></a>  &lt;/pre&gt;
<a name="l257"><span class="linenum"> 257</span></a>                  Plus intéressant encore est la vérification sur
<a name="l258"><span class="linenum"> 258</span></a>                  le code de la réponse HTTP. Pareillement au type MIME,
<a name="l259"><span class="linenum"> 259</span></a>                  nous pouvons nous assurer que le code renvoyé se trouve
<a name="l260"><span class="linenum"> 260</span></a>                  bien dans un liste de valeurs possibles...
<a name="l261"><span class="linenum"> 261</span></a>  &lt;pre&gt;
<a name="l262"><span class="linenum"> 262</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l263"><span class="linenum"> 263</span></a>      
<a name="l264"><span class="linenum"> 264</span></a>      function <a class="function" onClick="logFunction('testHomepage')" href="../../../../_functions/testhomepage.html" onMouseOver="funcPopup(event,'testhomepage')">testHomepage</a>() {
<a name="l265"><span class="linenum"> 265</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://simpletest.sourceforge.net/');&lt;strong&gt;
<a name="l266"><span class="linenum"> 266</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertResponse')" href="../../../../_functions/assertresponse.html" onMouseOver="funcPopup(event,'assertresponse')">assertResponse</a>(200);&lt;/strong&gt;
<a name="l267"><span class="linenum"> 267</span></a>      }
<a name="l268"><span class="linenum"> 268</span></a>  }
<a name="l269"><span class="linenum"> 269</span></a>  &lt;/pre&gt;
<a name="l270"><span class="linenum"> 270</span></a>                  Ici nous vérifions que le téléchargement s'est
<a name="l271"><span class="linenum"> 271</span></a>                  bien terminé en ne permettant qu'une réponse HTTP 200.
<a name="l272"><span class="linenum"> 272</span></a>                  Ce test passera, mais ce n'est pas la meilleure façon de procéder.
<a name="l273"><span class="linenum"> 273</span></a>                  Il n'existe aucune page sur &lt;em&gt;http://simpletest.sourceforge.net/&lt;/em&gt;,
<a name="l274"><span class="linenum"> 274</span></a>                  à la place le serveur renverra une redirection vers
<a name="l275"><span class="linenum"> 275</span></a>                  &lt;em&gt;http://www.lastcraft.com/simple_test.php&lt;/em&gt;.
<a name="l276"><span class="linenum"> 276</span></a>                  &lt;span class=&quot;new_code&quot;&gt;WebTestCase&lt;/span&gt; suit automatiquement trois
<a name="l277"><span class="linenum"> 277</span></a>                  de ces redirections. Les tests sont quelque peu plus
<a name="l278"><span class="linenum"> 278</span></a>                  robustes de la sorte. Surtout qu'on est souvent plus intéressé
<a name="l279"><span class="linenum"> 279</span></a>                  par l'interaction entre les pages que de leur simple livraison.
<a name="l280"><span class="linenum"> 280</span></a>                  Si les redirections se révèlent être digne d'intérêt,
<a name="l281"><span class="linenum"> 281</span></a>                  il reste possible de les supprimer...
<a name="l282"><span class="linenum"> 282</span></a>  &lt;pre&gt;
<a name="l283"><span class="linenum"> 283</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l284"><span class="linenum"> 284</span></a>      
<a name="l285"><span class="linenum"> 285</span></a>      function <a class="function" onClick="logFunction('testHomepage')" href="../../../../_functions/testhomepage.html" onMouseOver="funcPopup(event,'testhomepage')">testHomepage</a>() {&lt;strong&gt;
<a name="l286"><span class="linenum"> 286</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('setMaximumRedirects')" href="../../../../_functions/setmaximumredirects.html" onMouseOver="funcPopup(event,'setmaximumredirects')">setMaximumRedirects</a>(0);&lt;/strong&gt;
<a name="l287"><span class="linenum"> 287</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://simpletest.sourceforge.net/');
<a name="l288"><span class="linenum"> 288</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertResponse')" href="../../../../_functions/assertresponse.html" onMouseOver="funcPopup(event,'assertresponse')">assertResponse</a>(200);
<a name="l289"><span class="linenum"> 289</span></a>      }
<a name="l290"><span class="linenum"> 290</span></a>  }
<a name="l291"><span class="linenum"> 291</span></a>  &lt;/pre&gt;
<a name="l292"><span class="linenum"> 292</span></a>                  Alors l'assertion échoue comme prévue...
<a name="l293"><span class="linenum"> 293</span></a>  &lt;pre class=&quot;shell&quot;&gt;
<a name="l294"><span class="linenum"> 294</span></a>  Web site tests
<a name="l295"><span class="linenum"> 295</span></a>  1) Expecting response in [200] got [302]
<a name="l296"><span class="linenum"> 296</span></a>      in testhomepage
<a name="l297"><span class="linenum"> 297</span></a>      in testoflastcraft
<a name="l298"><span class="linenum"> 298</span></a>      in lastcraft_test.php
<a name="l299"><span class="linenum"> 299</span></a>  FAILURES!!!
<a name="l300"><span class="linenum"> 300</span></a>  Test cases run: 1/1, Failures: 1, Exceptions: 0
<a name="l301"><span class="linenum"> 301</span></a>  &lt;/pre&gt;
<a name="l302"><span class="linenum"> 302</span></a>                  Nous pouvons modifier le test pour accepter les redirections...
<a name="l303"><span class="linenum"> 303</span></a>  &lt;pre&gt;
<a name="l304"><span class="linenum"> 304</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l305"><span class="linenum"> 305</span></a>      
<a name="l306"><span class="linenum"> 306</span></a>      function <a class="function" onClick="logFunction('testHomepage')" href="../../../../_functions/testhomepage.html" onMouseOver="funcPopup(event,'testhomepage')">testHomepage</a>() {
<a name="l307"><span class="linenum"> 307</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('setMaximumRedirects')" href="../../../../_functions/setmaximumredirects.html" onMouseOver="funcPopup(event,'setmaximumredirects')">setMaximumRedirects</a>(0);
<a name="l308"><span class="linenum"> 308</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://simpletest.sourceforge.net/');
<a name="l309"><span class="linenum"> 309</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertResponse')" href="../../../../_functions/assertresponse.html" onMouseOver="funcPopup(event,'assertresponse')">assertResponse</a>(&lt;strong&gt;array(301, 302, 303, 307)&lt;/strong&gt;);
<a name="l310"><span class="linenum"> 310</span></a>      }
<a name="l311"><span class="linenum"> 311</span></a>  }
<a name="l312"><span class="linenum"> 312</span></a>  &lt;/pre&gt;
<a name="l313"><span class="linenum"> 313</span></a>                  Maitenant ça passe.
<a name="l314"><span class="linenum"> 314</span></a>              &lt;/p&gt;
<a name="l315"><span class="linenum"> 315</span></a>          
<a name="l316"><span class="linenum"> 316</span></a>          &lt;h2&gt;
<a name="l317"><span class="linenum"> 317</span></a>  &lt;a class=&quot;target&quot; name=&quot;navigation&quot;&gt;&lt;/a&gt;Navigeur dans un site web&lt;/h2&gt;
<a name="l318"><span class="linenum"> 318</span></a>              &lt;p&gt;
<a name="l319"><span class="linenum"> 319</span></a>                  Les utilisateurs ne naviguent pas souvent en tapant les URLs,
<a name="l320"><span class="linenum"> 320</span></a>                  mais surtout en cliquant sur des liens et des boutons.
<a name="l321"><span class="linenum"> 321</span></a>                  Ici nous confirmons que les informations sur le contact
<a name="l322"><span class="linenum"> 322</span></a>                  peuvent être atteintes depuis la page d'accueil...
<a name="l323"><span class="linenum"> 323</span></a>  &lt;pre&gt;
<a name="l324"><span class="linenum"> 324</span></a>  <span class="keyword">class </span><a class="class" onClick="logClass('TestOfLastcraft')" href="../../../../_classes/testoflastcraft.html" onMouseOver="classPopup(event,'testoflastcraft')">TestOfLastcraft</a> <span class="keyword">extends</span> <a class="class" onClick="logClass('WebTestCase')" href="../../../../_classes/webtestcase.html" onMouseOver="classPopup(event,'webtestcase')">WebTestCase</a> {
<a name="l325"><span class="linenum"> 325</span></a>      ...
<a name="l326"><span class="linenum"> 326</span></a>      function <a class="function" onClick="logFunction('testContact')" href="../../../../_functions/testcontact.html" onMouseOver="funcPopup(event,'testcontact')">testContact</a>() {
<a name="l327"><span class="linenum"> 327</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>('http://www.lastcraft.com/');&lt;strong&gt;
<a name="l328"><span class="linenum"> 328</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('clickLink')" href="../../../../_functions/clicklink.html" onMouseOver="funcPopup(event,'clicklink')">clickLink</a>('About');
<a name="l329"><span class="linenum"> 329</span></a>          <a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('assertTitle')" href="../../../../_functions/asserttitle.html" onMouseOver="funcPopup(event,'asserttitle')">assertTitle</a>('About Last Craft');&lt;/strong&gt;
<a name="l330"><span class="linenum"> 330</span></a>      }
<a name="l331"><span class="linenum"> 331</span></a>  }
<a name="l332"><span class="linenum"> 332</span></a>  &lt;/pre&gt;
<a name="l333"><span class="linenum"> 333</span></a>                  Le paramètre est le texte du lien.
<a name="l334"><span class="linenum"> 334</span></a>              &lt;/p&gt;
<a name="l335"><span class="linenum"> 335</span></a>              &lt;p&gt;
<a name="l336"><span class="linenum"> 336</span></a>                  Il l'objectif est un bouton plutôt qu'une balise ancre,
<a name="l337"><span class="linenum"> 337</span></a>                  alors &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickSubmit')" href="../../../../_functions/clicksubmit.html" onMouseOver="funcPopup(event,'clicksubmit')">clickSubmit</a>()&lt;/span&gt; doit être utilisé avec
<a name="l338"><span class="linenum"> 338</span></a>                  le titre du bouton...
<a name="l339"><span class="linenum"> 339</span></a>  &lt;pre&gt;
<a name="l340"><span class="linenum"> 340</span></a>  &lt;strong&gt;<a class="var it7" onMouseOver="hilite(7)" onMouseOut="lolite()" onClick="logVariable('this')" href="../../../../_variables/this.html">$this</a>-&amp;gt;<a class="function" onClick="logFunction('clickSubmit')" href="../../../../_functions/clicksubmit.html" onMouseOver="funcPopup(event,'clicksubmit')">clickSubmit</a>('Go!');&lt;/strong&gt;
<a name="l341"><span class="linenum"> 341</span></a>  &lt;/pre&gt;
<a name="l342"><span class="linenum"> 342</span></a>              &lt;/p&gt;
<a name="l343"><span class="linenum"> 343</span></a>              &lt;p&gt;
<a name="l344"><span class="linenum"> 344</span></a>                  La liste des méthodes de navigation est...
<a name="l345"><span class="linenum"> 345</span></a>                  &lt;table&gt;&lt;tbody&gt;
<a name="l346"><span class="linenum"> 346</span></a>                      &lt;tr&gt;
<a name="l347"><span class="linenum"> 347</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>(<a class="var it333" onMouseOver="hilite(333)" onMouseOut="lolite()" onClick="logVariable('url')" href="../../../../_variables/url.html">$url</a>, <a class="var it670" onMouseOver="hilite(670)" onMouseOut="lolite()" onClick="logVariable('parameters')" href="../../../../_variables/parameters.html">$parameters</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l348"><span class="linenum"> 348</span></a>  &lt;td&gt;Envoie une requête GET avec ces paramètres&lt;/td&gt;
<a name="l349"><span class="linenum"> 349</span></a>  &lt;/tr&gt;
<a name="l350"><span class="linenum"> 350</span></a>                      &lt;tr&gt;
<a name="l351"><span class="linenum"> 351</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('post')" href="../../../../_functions/post.html" onMouseOver="funcPopup(event,'post')">post</a>(<a class="var it333" onMouseOver="hilite(333)" onMouseOut="lolite()" onClick="logVariable('url')" href="../../../../_variables/url.html">$url</a>, <a class="var it670" onMouseOver="hilite(670)" onMouseOut="lolite()" onClick="logVariable('parameters')" href="../../../../_variables/parameters.html">$parameters</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l352"><span class="linenum"> 352</span></a>  &lt;td&gt;Envoie une requête POST avec ces paramètres&lt;/td&gt;
<a name="l353"><span class="linenum"> 353</span></a>  &lt;/tr&gt;
<a name="l354"><span class="linenum"> 354</span></a>                      &lt;tr&gt;
<a name="l355"><span class="linenum"> 355</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('head')" href="../../../../_functions/head.html" onMouseOver="funcPopup(event,'head')">head</a>(<a class="var it333" onMouseOver="hilite(333)" onMouseOut="lolite()" onClick="logVariable('url')" href="../../../../_variables/url.html">$url</a>, <a class="var it670" onMouseOver="hilite(670)" onMouseOut="lolite()" onClick="logVariable('parameters')" href="../../../../_variables/parameters.html">$parameters</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l356"><span class="linenum"> 356</span></a>  &lt;td&gt;Envoie une requête HEAD sans remplacer le contenu de la page&lt;/td&gt;
<a name="l357"><span class="linenum"> 357</span></a>  &lt;/tr&gt;
<a name="l358"><span class="linenum"> 358</span></a>                      &lt;tr&gt;
<a name="l359"><span class="linenum"> 359</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('retry')" href="../../../../_functions/retry.html" onMouseOver="funcPopup(event,'retry')">retry</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l360"><span class="linenum"> 360</span></a>  &lt;td&gt;Relance la dernière requête&lt;/td&gt;
<a name="l361"><span class="linenum"> 361</span></a>  &lt;/tr&gt;
<a name="l362"><span class="linenum"> 362</span></a>                      &lt;tr&gt;
<a name="l363"><span class="linenum"> 363</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('back')" href="../../../../_functions/back.html" onMouseOver="funcPopup(event,'back')">back</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l364"><span class="linenum"> 364</span></a>  &lt;td&gt;Identique au bouton &quot;Précédent&quot; du navigateur&lt;/td&gt;
<a name="l365"><span class="linenum"> 365</span></a>  &lt;/tr&gt;
<a name="l366"><span class="linenum"> 366</span></a>                      &lt;tr&gt;
<a name="l367"><span class="linenum"> 367</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('forward')" href="../../../../_functions/forward.html" onMouseOver="funcPopup(event,'forward')">forward</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l368"><span class="linenum"> 368</span></a>  &lt;td&gt;Identique au bouton &quot;Suivant&quot; du navigateur&lt;/td&gt;
<a name="l369"><span class="linenum"> 369</span></a>  &lt;/tr&gt;
<a name="l370"><span class="linenum"> 370</span></a>                      &lt;tr&gt;
<a name="l371"><span class="linenum"> 371</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('authenticate')" href="../../../../_functions/authenticate.html" onMouseOver="funcPopup(event,'authenticate')">authenticate</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it11" onMouseOver="hilite(11)" onMouseOut="lolite()" onClick="logVariable('password')" href="../../../../_variables/password.html">$password</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l372"><span class="linenum"> 372</span></a>  &lt;td&gt;Re-essaye avec une tentative d'authentification&lt;/td&gt;
<a name="l373"><span class="linenum"> 373</span></a>  &lt;/tr&gt;
<a name="l374"><span class="linenum"> 374</span></a>                      &lt;tr&gt;
<a name="l375"><span class="linenum"> 375</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('getFrameFocus')" href="../../../../_functions/getframefocus.html" onMouseOver="funcPopup(event,'getframefocus')">getFrameFocus</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l376"><span class="linenum"> 376</span></a>  &lt;td&gt;Le nom de la fenêtre en cours d'utilisation&lt;/td&gt;
<a name="l377"><span class="linenum"> 377</span></a>  &lt;/tr&gt;
<a name="l378"><span class="linenum"> 378</span></a>                      &lt;tr&gt;
<a name="l379"><span class="linenum"> 379</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('setFrameFocusByIndex')" href="../../../../_functions/setframefocusbyindex.html" onMouseOver="funcPopup(event,'setframefocusbyindex')">setFrameFocusByIndex</a>(<a class="var it904" onMouseOver="hilite(904)" onMouseOut="lolite()" onClick="logVariable('choice')" href="../../../../_variables/choice.html">$choice</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l380"><span class="linenum"> 380</span></a>  &lt;td&gt;Change le focus d'une fenêtre en commençant par 1&lt;/td&gt;
<a name="l381"><span class="linenum"> 381</span></a>  &lt;/tr&gt;
<a name="l382"><span class="linenum"> 382</span></a>                      &lt;tr&gt;
<a name="l383"><span class="linenum"> 383</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('setFrameFocus')" href="../../../../_functions/setframefocus.html" onMouseOver="funcPopup(event,'setframefocus')">setFrameFocus</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l384"><span class="linenum"> 384</span></a>  &lt;td&gt;Change le focus d'une fenêtre en utilisant son nom&lt;/td&gt;
<a name="l385"><span class="linenum"> 385</span></a>  &lt;/tr&gt;
<a name="l386"><span class="linenum"> 386</span></a>                      &lt;tr&gt;
<a name="l387"><span class="linenum"> 387</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clearFrameFocus')" href="../../../../_functions/clearframefocus.html" onMouseOver="funcPopup(event,'clearframefocus')">clearFrameFocus</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l388"><span class="linenum"> 388</span></a>  &lt;td&gt;Revient à un traitement de toutes les fenêtres comme une seule&lt;/td&gt;
<a name="l389"><span class="linenum"> 389</span></a>  &lt;/tr&gt;
<a name="l390"><span class="linenum"> 390</span></a>                      &lt;tr&gt;
<a name="l391"><span class="linenum"> 391</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickSubmit')" href="../../../../_functions/clicksubmit.html" onMouseOver="funcPopup(event,'clicksubmit')">clickSubmit</a>(<a class="var it106" onMouseOver="hilite(106)" onMouseOut="lolite()" onClick="logVariable('label')" href="../../../../_variables/label.html">$label</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l392"><span class="linenum"> 392</span></a>  &lt;td&gt;Clique sur le premier bouton avec cette étiquette&lt;/td&gt;
<a name="l393"><span class="linenum"> 393</span></a>  &lt;/tr&gt;
<a name="l394"><span class="linenum"> 394</span></a>                      &lt;tr&gt;
<a name="l395"><span class="linenum"> 395</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickSubmitByName')" href="../../../../_functions/clicksubmitbyname.html" onMouseOver="funcPopup(event,'clicksubmitbyname')">clickSubmitByName</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l396"><span class="linenum"> 396</span></a>  &lt;td&gt;Clique sur le bouton avec cet attribut de nom&lt;/td&gt;
<a name="l397"><span class="linenum"> 397</span></a>  &lt;/tr&gt;
<a name="l398"><span class="linenum"> 398</span></a>                      &lt;tr&gt;
<a name="l399"><span class="linenum"> 399</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickSubmitById')" href="../../../../_functions/clicksubmitbyid.html" onMouseOver="funcPopup(event,'clicksubmitbyid')">clickSubmitById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l400"><span class="linenum"> 400</span></a>  &lt;td&gt;Clique sur le bouton avec cet attribut d'identification&lt;/td&gt;
<a name="l401"><span class="linenum"> 401</span></a>  &lt;/tr&gt;
<a name="l402"><span class="linenum"> 402</span></a>                      &lt;tr&gt;
<a name="l403"><span class="linenum"> 403</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickImage')" href="../../../../_functions/clickimage.html" onMouseOver="funcPopup(event,'clickimage')">clickImage</a>(<a class="var it106" onMouseOver="hilite(106)" onMouseOut="lolite()" onClick="logVariable('label')" href="../../../../_variables/label.html">$label</a>, <a class="var it259" onMouseOver="hilite(259)" onMouseOut="lolite()" onClick="logVariable('x')" href="../../../../_variables/x.html">$x</a>, <a class="var it903" onMouseOver="hilite(903)" onMouseOut="lolite()" onClick="logVariable('y')" href="../../../../_variables/y.html">$y</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l404"><span class="linenum"> 404</span></a>  &lt;td&gt;Clique sur une balise input de type image par son titre (title=&quot;*&quot;) our son texte alternatif (alt=&quot;*&quot;)&lt;/td&gt;
<a name="l405"><span class="linenum"> 405</span></a>  &lt;/tr&gt;
<a name="l406"><span class="linenum"> 406</span></a>                      &lt;tr&gt;
<a name="l407"><span class="linenum"> 407</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickImageByName')" href="../../../../_functions/clickimagebyname.html" onMouseOver="funcPopup(event,'clickimagebyname')">clickImageByName</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it259" onMouseOver="hilite(259)" onMouseOut="lolite()" onClick="logVariable('x')" href="../../../../_variables/x.html">$x</a>, <a class="var it903" onMouseOver="hilite(903)" onMouseOut="lolite()" onClick="logVariable('y')" href="../../../../_variables/y.html">$y</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l408"><span class="linenum"> 408</span></a>  &lt;td&gt;Clique sur une balise input de type image par son attribut (name=&quot;*&quot;)&lt;/td&gt;
<a name="l409"><span class="linenum"> 409</span></a>  &lt;/tr&gt;
<a name="l410"><span class="linenum"> 410</span></a>                      &lt;tr&gt;
<a name="l411"><span class="linenum"> 411</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickImageById')" href="../../../../_functions/clickimagebyid.html" onMouseOver="funcPopup(event,'clickimagebyid')">clickImageById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>, <a class="var it259" onMouseOver="hilite(259)" onMouseOut="lolite()" onClick="logVariable('x')" href="../../../../_variables/x.html">$x</a>, <a class="var it903" onMouseOver="hilite(903)" onMouseOut="lolite()" onClick="logVariable('y')" href="../../../../_variables/y.html">$y</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l412"><span class="linenum"> 412</span></a>  &lt;td&gt;Clique sur une balise input de type image par son identifiant (id=&quot;*&quot;)&lt;/td&gt;
<a name="l413"><span class="linenum"> 413</span></a>  &lt;/tr&gt;
<a name="l414"><span class="linenum"> 414</span></a>                      &lt;tr&gt;
<a name="l415"><span class="linenum"> 415</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('submitFormById')" href="../../../../_functions/submitformbyid.html" onMouseOver="funcPopup(event,'submitformbyid')">submitFormById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l416"><span class="linenum"> 416</span></a>  &lt;td&gt;Soumet un formulaire sans valeur de soumission&lt;/td&gt;
<a name="l417"><span class="linenum"> 417</span></a>  &lt;/tr&gt;
<a name="l418"><span class="linenum"> 418</span></a>                      &lt;tr&gt;
<a name="l419"><span class="linenum"> 419</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickLink')" href="../../../../_functions/clicklink.html" onMouseOver="funcPopup(event,'clicklink')">clickLink</a>(<a class="var it106" onMouseOver="hilite(106)" onMouseOut="lolite()" onClick="logVariable('label')" href="../../../../_variables/label.html">$label</a>, <a class="var it370" onMouseOver="hilite(370)" onMouseOut="lolite()" onClick="logVariable('index')" href="../../../../_variables/index.html">$index</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l420"><span class="linenum"> 420</span></a>  &lt;td&gt;Clique sur une ancre avec ce texte d'étiquette visible&lt;/td&gt;
<a name="l421"><span class="linenum"> 421</span></a>  &lt;/tr&gt;
<a name="l422"><span class="linenum"> 422</span></a>                      &lt;tr&gt;
<a name="l423"><span class="linenum"> 423</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('clickLinkById')" href="../../../../_functions/clicklinkbyid.html" onMouseOver="funcPopup(event,'clicklinkbyid')">clickLinkById</a>(<a class="var it36" onMouseOver="hilite(36)" onMouseOut="lolite()" onClick="logVariable('id')" href="../../../../_variables/id.html">$id</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l424"><span class="linenum"> 424</span></a>  &lt;td&gt;Clique sur une ancre avec cet attribut d'identification&lt;/td&gt;
<a name="l425"><span class="linenum"> 425</span></a>  &lt;/tr&gt;
<a name="l426"><span class="linenum"> 426</span></a>                  &lt;/tbody&gt;&lt;/table&gt;
<a name="l427"><span class="linenum"> 427</span></a>              &lt;/p&gt;
<a name="l428"><span class="linenum"> 428</span></a>              &lt;p&gt;
<a name="l429"><span class="linenum"> 429</span></a>                  Les paramètres dans les méthodes &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('get')" href="../../../../_functions/get.html" onMouseOver="funcPopup(event,'get')">get</a>()&lt;/span&gt;, 
<a name="l430"><span class="linenum"> 430</span></a>                  &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('post')" href="../../../../_functions/post.html" onMouseOver="funcPopup(event,'post')">post</a>()&lt;/span&gt; et &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('head')" href="../../../../_functions/head.html" onMouseOver="funcPopup(event,'head')">head</a>()&lt;/span&gt; sont optionnels.
<a name="l431"><span class="linenum"> 431</span></a>                  Le téléchargement via  HTTP HEAD ne modifie pas
<a name="l432"><span class="linenum"> 432</span></a>                  le contexte du navigateur, il se limite au chargement des cookies.
<a name="l433"><span class="linenum"> 433</span></a>                  Cela peut être utilise lorsqu'une image ou une feuille de style
<a name="l434"><span class="linenum"> 434</span></a>                  initie un cookie pour bloquer un robot trop entreprenant.
<a name="l435"><span class="linenum"> 435</span></a>              &lt;/p&gt;
<a name="l436"><span class="linenum"> 436</span></a>              &lt;p&gt;
<a name="l437"><span class="linenum"> 437</span></a>                  Les commandes &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('retry')" href="../../../../_functions/retry.html" onMouseOver="funcPopup(event,'retry')">retry</a>()&lt;/span&gt;, &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('back')" href="../../../../_functions/back.html" onMouseOver="funcPopup(event,'back')">back</a>()&lt;/span&gt;
<a name="l438"><span class="linenum"> 438</span></a>                  et &lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('forward')" href="../../../../_functions/forward.html" onMouseOver="funcPopup(event,'forward')">forward</a>()&lt;/span&gt; fonctionnent exactement comme
<a name="l439"><span class="linenum"> 439</span></a>                  dans un navigateur. Elles utilisent l'historique pour
<a name="l440"><span class="linenum"> 440</span></a>                  relancer les pages. Une technique bien pratique pour
<a name="l441"><span class="linenum"> 441</span></a>                  vérifier les effets d'un bouton retour sur vos formulaires.
<a name="l442"><span class="linenum"> 442</span></a>              &lt;/p&gt;
<a name="l443"><span class="linenum"> 443</span></a>              &lt;p&gt;
<a name="l444"><span class="linenum"> 444</span></a>                  Les méthodes sur les fenêtres méritent une petite explication.
<a name="l445"><span class="linenum"> 445</span></a>                  Par défaut, une page avec des fenêtres est traitée comme toutes
<a name="l446"><span class="linenum"> 446</span></a>                  les autres. Le contenu sera vérifié à travers l'ensemble de
<a name="l447"><span class="linenum"> 447</span></a>                  la &quot;frameset&quot;, par conséquent un lien fonctionnera,
<a name="l448"><span class="linenum"> 448</span></a>                  peu importe la fenêtre qui contient la balise ancre.
<a name="l449"><span class="linenum"> 449</span></a>                  Vous pouvez outrepassé ce comportement en exigeant
<a name="l450"><span class="linenum"> 450</span></a>                  le focus sur une unique fenêtre. Si vous réalisez cela,
<a name="l451"><span class="linenum"> 451</span></a>                  toutes les recherches et toutes les actions se limiteront
<a name="l452"><span class="linenum"> 452</span></a>                  à cette unique fenêtre, y compris les demandes d'authentification.
<a name="l453"><span class="linenum"> 453</span></a>                  Si un lien ou un bouton n'est pas dans la fenêtre en focus alors
<a name="l454"><span class="linenum"> 454</span></a>                  il ne peut pas être cliqué.
<a name="l455"><span class="linenum"> 455</span></a>              &lt;/p&gt;
<a name="l456"><span class="linenum"> 456</span></a>              &lt;p&gt;
<a name="l457"><span class="linenum"> 457</span></a>                  Tester la navigation sur des pages fixes ne vous alerte que
<a name="l458"><span class="linenum"> 458</span></a>                  quand vous avez cassé un script entier.
<a name="l459"><span class="linenum"> 459</span></a>                  Pour des pages fortement dynamiques,
<a name="l460"><span class="linenum"> 460</span></a>                  un forum de discussion par exemple,
<a name="l461"><span class="linenum"> 461</span></a>                  ça peut être crucial pour vérifier l'état de l'application.
<a name="l462"><span class="linenum"> 462</span></a>                  Pour la plupart des applications cependant,
<a name="l463"><span class="linenum"> 463</span></a>                  la logique vraiment délicate se situe dans la gestion
<a name="l464"><span class="linenum"> 464</span></a>                  des formulaires et des sessions.
<a name="l465"><span class="linenum"> 465</span></a>                  Heureusement SimpleTest aussi inclut
<a name="l466"><span class="linenum"> 466</span></a>                  &lt;a href=&quot;form_testing_documentation.html&quot;&gt;
<a name="l467"><span class="linenum"> 467</span></a>                  des outils pour tester des formulaires web&lt;/a&gt;.
<a name="l468"><span class="linenum"> 468</span></a>              &lt;/p&gt;
<a name="l469"><span class="linenum"> 469</span></a>          
<a name="l470"><span class="linenum"> 470</span></a>          &lt;h2&gt;
<a name="l471"><span class="linenum"> 471</span></a>  &lt;a class=&quot;target&quot; name=&quot;requete&quot;&gt;&lt;/a&gt;Modifier la requête&lt;/h2&gt;
<a name="l472"><span class="linenum"> 472</span></a>              &lt;p&gt;
<a name="l473"><span class="linenum"> 473</span></a>                  Bien que SimpleTest n'ait pas comme objectif
<a name="l474"><span class="linenum"> 474</span></a>                  de contrôler des erreurs réseau, il contient quand même
<a name="l475"><span class="linenum"> 475</span></a>                  des méthodes pour modifier et déboguer les requêtes qu'il lance.
<a name="l476"><span class="linenum"> 476</span></a>                  Voici une autre liste de méthode...
<a name="l477"><span class="linenum"> 477</span></a>                  &lt;table&gt;&lt;tbody&gt;
<a name="l478"><span class="linenum"> 478</span></a>                      &lt;tr&gt;
<a name="l479"><span class="linenum"> 479</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('getTransportError')" href="../../../../_functions/gettransporterror.html" onMouseOver="funcPopup(event,'gettransporterror')">getTransportError</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l480"><span class="linenum"> 480</span></a>  &lt;td&gt;La dernière erreur de socket&lt;/td&gt;
<a name="l481"><span class="linenum"> 481</span></a>  &lt;/tr&gt;
<a name="l482"><span class="linenum"> 482</span></a>                      &lt;tr&gt;
<a name="l483"><span class="linenum"> 483</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('getUrl')" href="../../../../_functions/geturl.html" onMouseOver="funcPopup(event,'geturl')">getUrl</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l484"><span class="linenum"> 484</span></a>  &lt;td&gt;La localisation courante&lt;/td&gt;
<a name="l485"><span class="linenum"> 485</span></a>  &lt;/tr&gt;
<a name="l486"><span class="linenum"> 486</span></a>                      &lt;tr&gt;
<a name="l487"><span class="linenum"> 487</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('showRequest')" href="../../../../_functions/showrequest.html" onMouseOver="funcPopup(event,'showrequest')">showRequest</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l488"><span class="linenum"> 488</span></a>  &lt;td&gt;Déverse la requête sortante&lt;/td&gt;
<a name="l489"><span class="linenum"> 489</span></a>  &lt;/tr&gt;
<a name="l490"><span class="linenum"> 490</span></a>                      &lt;tr&gt;
<a name="l491"><span class="linenum"> 491</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('showHeaders')" href="../../../../_functions/showheaders.html" onMouseOver="funcPopup(event,'showheaders')">showHeaders</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l492"><span class="linenum"> 492</span></a>  &lt;td&gt;Déverse les entêtes d'entrée&lt;/td&gt;
<a name="l493"><span class="linenum"> 493</span></a>  &lt;/tr&gt;
<a name="l494"><span class="linenum"> 494</span></a>                      &lt;tr&gt;
<a name="l495"><span class="linenum"> 495</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('showSource')" href="../../../../_functions/showsource.html" onMouseOver="funcPopup(event,'showsource')">showSource</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l496"><span class="linenum"> 496</span></a>  &lt;td&gt;Déverse le contenu brut de la page HTML&lt;/td&gt;
<a name="l497"><span class="linenum"> 497</span></a>  &lt;/tr&gt;
<a name="l498"><span class="linenum"> 498</span></a>                      &lt;tr&gt;
<a name="l499"><span class="linenum"> 499</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('ignoreFrames')" href="../../../../_functions/ignoreframes.html" onMouseOver="funcPopup(event,'ignoreframes')">ignoreFrames</a>()&lt;/span&gt;&lt;/td&gt;
<a name="l500"><span class="linenum"> 500</span></a>  &lt;td&gt;Ne recharge pas les framesets&lt;/td&gt;
<a name="l501"><span class="linenum"> 501</span></a>  &lt;/tr&gt;
<a name="l502"><span class="linenum"> 502</span></a>                      &lt;tr&gt;
<a name="l503"><span class="linenum"> 503</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="phpfunction" onClick="logFunction('setCookie')" href="../../../../_functions/setcookie.html" onMouseOver="phpfuncPopup(event,'setcookie')">setCookie</a>(<a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it67" onMouseOver="hilite(67)" onMouseOut="lolite()" onClick="logVariable('value')" href="../../../../_variables/value.html">$value</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l504"><span class="linenum"> 504</span></a>  &lt;td&gt;Initie un cookie à partir de maintenant&lt;/td&gt;
<a name="l505"><span class="linenum"> 505</span></a>  &lt;/tr&gt;
<a name="l506"><span class="linenum"> 506</span></a>                      &lt;tr&gt;
<a name="l507"><span class="linenum"> 507</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('addHeader')" href="../../../../_functions/addheader.html" onMouseOver="funcPopup(event,'addheader')">addHeader</a>(<a class="var it251" onMouseOver="hilite(251)" onMouseOut="lolite()" onClick="logVariable('header')" href="../../../../_variables/header.html">$header</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l508"><span class="linenum"> 508</span></a>  &lt;td&gt;Ajoute toujours cette entête à la requête&lt;/td&gt;
<a name="l509"><span class="linenum"> 509</span></a>  &lt;/tr&gt;
<a name="l510"><span class="linenum"> 510</span></a>                      &lt;tr&gt;
<a name="l511"><span class="linenum"> 511</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('setMaximumRedirects')" href="../../../../_functions/setmaximumredirects.html" onMouseOver="funcPopup(event,'setmaximumredirects')">setMaximumRedirects</a>(<a class="var it905" onMouseOver="hilite(905)" onMouseOut="lolite()" onClick="logVariable('max')" href="../../../../_variables/max.html">$max</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l512"><span class="linenum"> 512</span></a>  &lt;td&gt;S'arrête après autant de redirections&lt;/td&gt;
<a name="l513"><span class="linenum"> 513</span></a>  &lt;/tr&gt;
<a name="l514"><span class="linenum"> 514</span></a>                      &lt;tr&gt;
<a name="l515"><span class="linenum"> 515</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('setConnectionTimeout')" href="../../../../_functions/setconnectiontimeout.html" onMouseOver="funcPopup(event,'setconnectiontimeout')">setConnectionTimeout</a>(<a class="var it786" onMouseOver="hilite(786)" onMouseOut="lolite()" onClick="logVariable('timeout')" href="../../../../_variables/timeout.html">$timeout</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l516"><span class="linenum"> 516</span></a>  &lt;td&gt;Termine la connexion après autant de temps entre les bytes&lt;/td&gt;
<a name="l517"><span class="linenum"> 517</span></a>  &lt;/tr&gt;
<a name="l518"><span class="linenum"> 518</span></a>                      &lt;tr&gt;
<a name="l519"><span class="linenum"> 519</span></a>  &lt;td&gt;&lt;span class=&quot;new_code&quot;&gt;<a class="function" onClick="logFunction('useProxy')" href="../../../../_functions/useproxy.html" onMouseOver="funcPopup(event,'useproxy')">useProxy</a>(<a class="var it900" onMouseOver="hilite(900)" onMouseOut="lolite()" onClick="logVariable('proxy')" href="../../../../_variables/proxy.html">$proxy</a>, <a class="var it74" onMouseOver="hilite(74)" onMouseOut="lolite()" onClick="logVariable('name')" href="../../../../_variables/name.html">$name</a>, <a class="var it11" onMouseOver="hilite(11)" onMouseOut="lolite()" onClick="logVariable('password')" href="../../../../_variables/password.html">$password</a>)&lt;/span&gt;&lt;/td&gt;
<a name="l520"><span class="linenum"> 520</span></a>  &lt;td&gt;Effectue les requêtes à travers ce proxy d'URL&lt;/td&gt;
<a name="l521"><span class="linenum"> 521</span></a>  &lt;/tr&gt;
<a name="l522"><span class="linenum"> 522</span></a>                  &lt;/tbody&gt;&lt;/table&gt;
<a name="l523"><span class="linenum"> 523</span></a>              &lt;/p&gt;
<a name="l524"><span class="linenum"> 524</span></a>          
<a name="l525"><span class="linenum"> 525</span></a>      &lt;/div&gt;
<a name="l526"><span class="linenum"> 526</span></a>          References and related information...
<a name="l527"><span class="linenum"> 527</span></a>          &lt;ul&gt;
<a name="l528"><span class="linenum"> 528</span></a>  &lt;li&gt;
<a name="l529"><span class="linenum"> 529</span></a>              La page du projet SimpleTest sur
<a name="l530"><span class="linenum"> 530</span></a>              &lt;a href=&quot;http://sourceforge.net/projects/simpletest/&quot;&gt;SourceForge&lt;/a&gt;.
<a name="l531"><span class="linenum"> 531</span></a>          &lt;/li&gt;
<a name="l532"><span class="linenum"> 532</span></a>  &lt;li&gt;
<a name="l533"><span class="linenum"> 533</span></a>              La page de téléchargement de SimpleTest sur
<a name="l534"><span class="linenum"> 534</span></a>              &lt;a href=&quot;http://www.lastcraft.com/simple_test.php&quot;&gt;LastCraft&lt;/a&gt;.
<a name="l535"><span class="linenum"> 535</span></a>          &lt;/li&gt;
<a name="l536"><span class="linenum"> 536</span></a>  &lt;li&gt;
<a name="l537"><span class="linenum"> 537</span></a>              &lt;a href=&quot;http://simpletest.org/api/&quot;&gt;L'API du développeur pour SimpleTest&lt;/a&gt;
<a name="l538"><span class="linenum"> 538</span></a>              donne tous les détails sur les classes et les assertions disponibles.
<a name="l539"><span class="linenum"> 539</span></a>          &lt;/li&gt;
<a name="l540"><span class="linenum"> 540</span></a>  &lt;/ul&gt;
<a name="l541"><span class="linenum"> 541</span></a>  &lt;div class=&quot;menu_back&quot;&gt;&lt;div class=&quot;menu&quot;&gt;
<a name="l542"><span class="linenum"> 542</span></a>  &lt;a href=&quot;index.html&quot;&gt;SimpleTest&lt;/a&gt;
<a name="l543"><span class="linenum"> 543</span></a>                  |
<a name="l544"><span class="linenum"> 544</span></a>                  &lt;a href=&quot;overview.html&quot;&gt;Overview&lt;/a&gt;
<a name="l545"><span class="linenum"> 545</span></a>                  |
<a name="l546"><span class="linenum"> 546</span></a>                  &lt;a href=&quot;unit_test_documentation.html&quot;&gt;Unit tester&lt;/a&gt;
<a name="l547"><span class="linenum"> 547</span></a>                  |
<a name="l548"><span class="linenum"> 548</span></a>                  &lt;a href=&quot;group_test_documentation.html&quot;&gt;Group tests&lt;/a&gt;
<a name="l549"><span class="linenum"> 549</span></a>                  |
<a name="l550"><span class="linenum"> 550</span></a>                  &lt;a href=&quot;mock_objects_documentation.html&quot;&gt;Mock objects&lt;/a&gt;
<a name="l551"><span class="linenum"> 551</span></a>                  |
<a name="l552"><span class="linenum"> 552</span></a>                  &lt;a href=&quot;partial_mocks_documentation.html&quot;&gt;Partial mocks&lt;/a&gt;
<a name="l553"><span class="linenum"> 553</span></a>                  |
<a name="l554"><span class="linenum"> 554</span></a>                  &lt;a href=&quot;reporter_documentation.html&quot;&gt;Reporting&lt;/a&gt;
<a name="l555"><span class="linenum"> 555</span></a>                  |
<a name="l556"><span class="linenum"> 556</span></a>                  &lt;a href=&quot;expectation_documentation.html&quot;&gt;Expectations&lt;/a&gt;
<a name="l557"><span class="linenum"> 557</span></a>                  |
<a name="l558"><span class="linenum"> 558</span></a>                  &lt;a href=&quot;web_tester_documentation.html&quot;&gt;Web tester&lt;/a&gt;
<a name="l559"><span class="linenum"> 559</span></a>                  |
<a name="l560"><span class="linenum"> 560</span></a>                  &lt;a href=&quot;form_testing_documentation.html&quot;&gt;Testing forms&lt;/a&gt;
<a name="l561"><span class="linenum"> 561</span></a>                  |
<a name="l562"><span class="linenum"> 562</span></a>                  &lt;a href=&quot;authentication_documentation.html&quot;&gt;Authentication&lt;/a&gt;
<a name="l563"><span class="linenum"> 563</span></a>                  |
<a name="l564"><span class="linenum"> 564</span></a>                  &lt;a href=&quot;browser_documentation.html&quot;&gt;Scriptable browser&lt;/a&gt;
<a name="l565"><span class="linenum"> 565</span></a>  &lt;/div&gt;&lt;/div&gt;
<a name="l566"><span class="linenum"> 566</span></a>  &lt;div class=&quot;copyright&quot;&gt;
<a name="l567"><span class="linenum"> 567</span></a>              Copyright&lt;br&gt;Marcus Baker 2006
<a name="l568"><span class="linenum"> 568</span></a>          &lt;/div&gt;
<a name="l569"><span class="linenum"> 569</span></a>  &lt;/body&gt;
<a name="l570"><span class="linenum"> 570</span></a>  &lt;/html&gt;
</pre>
</div>
<script language="JavaScript" type="text/javascript">
FUNC_DATA={
'assertresponse': ['assertresponse', 'Checks the response code against a list of possible values. ', [['tests/simpletest','web_tester.php',1227]], 66],
'gettransporterror': ['gettransporterror', 'Gets the last response error. ', [['tests/simpletest','web_tester.php',518],['tests/simpletest','frames.php',230],['tests/simpletest','page.php',162],['tests/simpletest','browser.php',696]], 14],
'addheader': ['addheader', 'Adds a header to every fetch. ', [['tests/simpletest','web_tester.php',642],['tests/simpletest','user_agent.php',65],['tests/simpletest','browser.php',368]], 35],
'clicksubmitbyname': ['clicksubmitbyname', 'Clicks the submit button by name attribute. The owning form will be submitted by this. ', [['tests/simpletest','web_tester.php',905],['tests/simpletest','browser.php',909]], 11],
'forward': ['forward', 'Equivalent to hitting the forward button on the browser. ', [['tests/simpletest','web_tester.php',778],['tests/simpletest','browser.php',121],['tests/simpletest','browser.php',599]], 15],
'post': ['post', 'Fetch an item from the POST array ', [['bonfire/codeigniter/core','Input.php',164],['tests/simpletest','web_tester.php',703],['tests/simpletest','browser.php',507]], 194],
'setconnectiontimeout': ['setconnectiontimeout', 'Sets the socket timeout for opening a connection and receiving at least one byte of information. ', [['tests/simpletest','web_tester.php',666],['tests/simpletest','user_agent.php',143],['tests/simpletest','browser.php',446]], 9],
'assertlink': ['assertlink', 'Tests for the presence of a link label. Match is case insensitive with normalised space. ', [['tests/simpletest','web_tester.php',1043]], 13],
'clicksubmitbyid': ['clicksubmitbyid', 'Clicks the submit button by ID attribute. The owning form will be submitted by this. ', [['tests/simpletest','web_tester.php',918],['tests/simpletest','browser.php',927]], 9],
'assertfieldbyid': ['assertfieldbyid', 'Confirms that the form element is currently set to the expected value. A missing form will always fail. If no ID is given then only the existence of the field is checked. ', [['tests/simpletest','web_tester.php',1185]], 13],
'clickimagebyname': ['clickimagebyname', 'Clicks the submit image by the name. Usually the alt tag or the nearest equivalent. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure. ', [['tests/simpletest','web_tester.php',961],['tests/simpletest','browser.php',979]], 7],
'assertcookie': ['assertcookie', 'Checks that a cookie is set for the current page and optionally checks the value. ', [['tests/simpletest','web_tester.php',1423]], 18],
'assertheader': ['assertheader', 'Checks each header line for the required value. If no value is given then only an existence check is made. ', [['tests/simpletest','web_tester.php',1314]], 7],
'useproxy': ['useproxy', 'Sets proxy to use on all requests for when testing from behind a firewall. Set URL to false to disable. ', [['tests/simpletest','web_tester.php',676],['tests/simpletest','simpletest.php',118],['tests/simpletest','user_agent.php',162],['tests/simpletest','browser.php',455]], 9],
'showheaders': ['showheaders', 'Dumps the current HTTP headers for debugging. ', [['tests/simpletest','web_tester.php',545]], 4],
'geturl': ['geturl', 'Resource name. ', [['tests/simpletest','http.php',35],['tests/simpletest','http.php',542],['tests/simpletest','web_tester.php',527],['tests/simpletest','frames.php',254],['tests/simpletest','page.php',135],['tests/simpletest','browser.php',81],['tests/simpletest','browser.php',743]], 44],
'clickimagebyid': ['clickimagebyid', 'Clicks the submit image by ID attribute. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure. ', [['tests/simpletest','web_tester.php',979],['tests/simpletest','browser.php',1002]], 7],
'assertnolink': ['assertnolink', 'Tests for the non-presence of a link label. Match is case insensitive with normalised space. ', [['tests/simpletest','web_tester.php',1064]], 6],
'showsource': ['showsource', 'Dumps the current HTML source for debugging. ', [['tests/simpletest','web_tester.php',553]], 2],
'testcontact': ['testcontact', '', [['tests/simpletest/docs/en','web_tester_documentation.html',329],['tests/simpletest/docs/fr','web_tester_documentation.html',326]], 0],
'assertmime': ['assertmime', 'Checks the mime type against a list of possible values. ', [['tests/simpletest','web_tester.php',1244]], 5],
'head': ['head', 'Does a HTTP HEAD fetch, fetching only the page headers. The current base URL is unchanged by this. ', [['tests/simpletest','web_tester.php',745],['tests/simpletest','browser.php',468]], 9],
'prefer': ['prefer', 'Puts the object to the global pool of \'preferred\' objects which can be retrieved with SimpleTest :: preferred() method. Instances of the same class are overwritten. ', [['tests/simpletest','simpletest.php',69]], 4],
'assertauthentication': ['assertauthentication', 'Attempt to match the authentication type within the security realm we are currently matching. ', [['tests/simpletest','web_tester.php',1260]], 7],
'testhomepage': ['testhomepage', '', [['tests/simpletest/docs/en','web_tester_documentation.html',114],['tests/simpletest/docs/en','web_tester_documentation.html',148],['tests/simpletest/docs/en','web_tester_documentation.html',288],['tests/simpletest/docs/en','web_tester_documentation.html',309],['tests/simpletest/docs/fr','overview.html',81],['tests/simpletest/docs/fr','web_tester_documentation.html',118],['tests/simpletest/docs/fr','web_tester_documentation.html',153],['tests/simpletest/docs/fr','web_tester_documentation.html',264],['tests/simpletest/docs/fr','web_tester_documentation.html',285],['tests/simpletest/docs/fr','web_tester_documentation.html',306]], 0],
'assertnocookie': ['assertnocookie', 'Checks that no cookie is present or that it has been successfully cleared. ', [['tests/simpletest','web_tester.php',1446]], 11],
'clearframefocus': ['clearframefocus', 'Clears the frame focus. All frames will be searched for content. ', [['tests/simpletest','web_tester.php',859],['tests/simpletest','frames.php',152],['tests/simpletest','page.php',251],['tests/simpletest','browser.php',687]], 18],
'setmaximumredirects': ['setmaximumredirects', 'Sets the maximum number of redirects before the web page is loaded regardless. ', [['tests/simpletest','web_tester.php',652],['tests/simpletest','user_agent.php',152],['tests/simpletest','browser.php',426]], 19],
'retry': ['retry', 'Equivalent to hitting the retry button on the browser. Will attempt to repeat the page fetch. ', [['tests/simpletest','web_tester.php',757],['tests/simpletest','browser.php',555]], 27],
'clicklink': ['clicklink', 'Follows a link by name. Will click the first link found with this link text by default, or a later one if an index is given. Match is case insensitive with normalised space. ', [['tests/simpletest','web_tester.php',1019],['tests/simpletest','browser.php',1073]], 48],
'authenticate': ['authenticate', 'Retries a request after setting the authentication for the current realm. ', [['tests/simpletest','web_tester.php',789],['tests/simpletest','browser.php',619]], 19],
'assertnoauthentication': ['assertnoauthentication', 'Checks that no authentication is necessary to view the desired page. ', [['tests/simpletest','web_tester.php',1284]], 2],
'asserttrue': ['asserttrue', 'Called from within the test methods to register passes and failures. ', [['tests/simpletest','web_tester.php',1460],['tests/simpletest','unit_tester.php',39],['tests/simpletest/extensions','pear_test_case.php',114],['tests/simpletest','shell_tester.php',131]], 495],
'webtests': ['webtests', '', [['tests/simpletest/docs/en','web_tester_documentation.html',97],['tests/simpletest/docs/fr','web_tester_documentation.html',101]], 0],
'submitformbyid': ['submitformbyid', 'Submits a form by the ID. ', [['tests/simpletest','web_tester.php',1008],['tests/simpletest','browser.php',1035]], 6],
'assertfield': ['assertfield', 'Confirms that the form element is currently set to the expected value. A missing form will always fail. If no value is given then only the existence of the field is checked. ', [['tests/simpletest','web_tester.php',1149]], 57],
'clicklinkbyid': ['clicklinkbyid', 'Follows a link by id attribute. ', [['tests/simpletest','web_tester.php',1033],['tests/simpletest','browser.php',1102]], 8],
'get': ['get', 'Fetch from cache ', [['bonfire/libraries','BF_Cache_file.php',47],['tests/simpletest/docs/fr','mock_objects_documentation.html',310],['bonfire/codeigniter/database','DB_active_rec.php',937],['bonfire/libraries','JSMin.php',187],['bonfire/libraries','template.php',648],['bonfire/codeigniter/core','Input.php',136],['bonfire/codeigniter/libraries/Cache/drivers','Cache_apc.php',30],['tests/simpletest','web_tester.php',689],['tests/_support','database.php',31],['bonfire/codeigniter/libraries/Cache/drivers','Cache_memcached.php',42],['bonfire/codeigniter/libraries/Cache/drivers','Cache_file.php',47],['bonfire/codeigniter/libraries/Cache','Cache.php',54],['bonfire/codeigniter/libraries/Cache/drivers','Cache_dummy.php',30],['tests/simpletest/docs/en','mock_objects_documentation.html',291],['tests/simpletest','simpletest.php',299],['tests/simpletest','browser.php',489]], 432],
'showrequest': ['showrequest', 'Dumps the current request for debugging. ', [['tests/simpletest','web_tester.php',537]], 3],
'clickimage': ['clickimage', 'Clicks the submit image by some kind of label. Usually the alt tag or the nearest equivalent. The owning form will be submitted by this. Clicking outside of the boundary of the coordinates will result in a failure. ', [['tests/simpletest','web_tester.php',943],['tests/simpletest','browser.php',956]], 10],
'addfile': ['addfile', 'Builds a test suite from a library of test cases. The new suite is composed into this one. ', [['tests/simpletest','test_case.php',525]], 75],
'getframefocus': ['getframefocus', 'Accessor for current frame focus. Will be false if no frame has focus. ', [['tests/simpletest','web_tester.php',827],['tests/simpletest','frames.php',77],['tests/simpletest','page.php',221],['tests/simpletest','browser.php',655]], 24],
'back': ['back', 'Equivalent to hitting the back button on the browser. ', [['tests/simpletest','web_tester.php',767],['tests/simpletest','browser.php',107],['tests/simpletest','browser.php',579]], 19],
'setframefocusbyindex': ['setframefocusbyindex', 'Sets the focus by index. The integer index starts from 1. ', [['tests/simpletest','web_tester.php',839],['tests/simpletest','frames.php',110],['tests/simpletest','page.php',231],['tests/simpletest','browser.php',667]], 27],
'assertrealm': ['assertrealm', 'Attempts to match the current security realm. ', [['tests/simpletest','web_tester.php',1297]], 10],
'setframefocus': ['setframefocus', 'Sets the focus by name. ', [['tests/simpletest','web_tester.php',849],['tests/simpletest','frames.php',131],['tests/simpletest','page.php',241],['tests/simpletest','browser.php',677]], 62],
'clicksubmit': ['clicksubmit', 'Clicks the submit button by label. The owning form will be submitted by this. ', [['tests/simpletest','web_tester.php',891],['tests/simpletest','browser.php',890]], 65],
'ignoreframes': ['ignoreframes', 'Disables frames support. Frames will not be fetched and the frameset page will be used instead. ', [['tests/simpletest','web_tester.php',597],['tests/simpletest','browser.php',227]], 8],
'assertlinkbyid': ['assertlinkbyid', 'Tests for the presence of a link id attribute. ', [['tests/simpletest','web_tester.php',1080]], 3],
'testsuite': ['testsuite', 'Sets the name of the test suite. ', [['tests/simpletest','test_case.php',481]], 25],
'asserttitle': ['asserttitle', 'Tests the text between the title tags. ', [['tests/simpletest','web_tester.php',1347]], 49],
'setcookie': ['setcookie', '', [], 44]};
CLASS_DATA={
'simpletest': ['simpletest', 'Registry and test context. Includes a few global options that I\'m slowly getting rid of. ', [['tests/simpletest','simpletest.php',17]], 90],
'webtestcase': ['webtestcase', 'Test case for testing of web pages. Allows fetching of pages, parsing of HTML and submitting forms. ', [['tests/simpletest','web_tester.php',426]], 67],
'webtests': ['webtests', '', [['tests/simpletest/docs/en','web_tester_documentation.html',96],['tests/simpletest/docs/fr','web_tester_documentation.html',100]], 0],
'testoflastcraft': ['testoflastcraft', '', [['tests/simpletest/docs/en','web_tester_documentation.html',112],['tests/simpletest/docs/en','web_tester_documentation.html',146],['tests/simpletest/docs/en','web_tester_documentation.html',266],['tests/simpletest/docs/en','web_tester_documentation.html',286],['tests/simpletest/docs/en','web_tester_documentation.html',307],['tests/simpletest/docs/en','web_tester_documentation.html',327],['tests/simpletest/docs/fr','web_tester_documentation.html',116],['tests/simpletest/docs/fr','web_tester_documentation.html',151],['tests/simpletest/docs/fr','web_tester_documentation.html',262],['tests/simpletest/docs/fr','web_tester_documentation.html',283],['tests/simpletest/docs/fr','web_tester_documentation.html',304],['tests/simpletest/docs/fr','web_tester_documentation.html',324]], 0],
'testsuite': ['testsuite', 'This is a composite test class for combining test cases and other RunnableTest classes into a group test. ', [['tests/simpletest','test_case.php',470]], 43],
'textreporter': ['textreporter', 'Sample minimal test displayer. Generates only failure messages and a pass count. For command line use. I\'ve tried to make it look like JUnit, but I wanted to output the errors as they arrived which meant dropping the dots. ', [['tests/simpletest','reporter.php',185]], 22]};
CONST_DATA={
};
</script>
<div id="func-popup" class="funcpopup"><p id="func-title" class="popup-title">title</p><p id="func-desc" class="popup-desc">Description</p><p id="func-body" class="popup-body">Body</p></div>
<div id="class-popup" class="funcpopup"><p id="class-title" class="popup-title">title</p><p id="class-desc" class="popup-desc">Description</p><p id="class-body" class="popup-body">Body</p></div>
<div id="const-popup" class="funcpopup"><p id="const-title" class="popup-title">title</p><p id="const-desc" class="popup-desc">Description</p><p id="const-body" class="popup-body">Body</p></div>
<div id="req-popup" class="funcpopup"><p id="req-title" class="popup-title">title</p><p id="req-body" class="popup-body">Body</p></div>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
	<tr><td>Generated: Thu Oct 23 18:57:41 2014</td>
	<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
	</tr>
</table>
</body></html>
