Location: PHPKode > projects > PHP on Trax > johnpipi-trax-f599562/trax/doc/__filesource/fsource_PHPonTraxTest__testTraxGeneratorTest.php.html
<html>
<head>
<title>File Source for TraxGeneratorTest.php</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>

<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%">
  <tr>
    <td class="header_top">PHPonTraxTest</td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
  <tr>
    <td class="header_menu">
  		  [ <a href="../classtrees_PHPonTraxTest.html" class="menu">class tree: PHPonTraxTest</a> ]
		  [ <a href="../elementindex_PHPonTraxTest.html" class="menu">index: PHPonTraxTest</a> ]
		  [ <a href="../elementindex.html" class="menu">all elements</a> ]
    </td>
  </tr>
  <tr><td class="header_line"><img src="../media/empty.png" width="1" height="1" border="0" alt=""  /></td></tr>
</table>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="200" class="menu">
	<div id="todolist">
			<p><a href="../todolist.html">Todo List</a></p>
	</div>
      <b>Packages:</b><br />
              <a href="../li_PHPonTrax.html">PHPonTrax</a><br />
              <a href="../li_PHPonTraxTest.html">PHPonTraxTest</a><br />
            <br /><br />
                  
                </td>
    <td>
      <table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">

<h1 align="center">Source for file TraxGeneratorTest.php</h1>
<p>Documentation is available at <a href="../PHPonTraxTest/_test_TraxGeneratorTest_php.html">TraxGeneratorTest.php</a></p>
<div class="php">
<div class="listing"><pre><ol><li><a name="a1"></a><span class="src-php">&lt;?php</span></li>
<li><a name="a2"></a><span class="src-doc">/**</span></li>
<li><a name="a3"></a><span class="src-doc"> *  File for the TraxGeneratorTest class</span></li>
<li><a name="a4"></a><span class="src-doc"> *</span></li>
<li><a name="a5"></a><span class="src-doc"> * (PHP 5)</span></li>
<li><a name="a6"></a><span class="src-doc"> *</span></li>
<li><a name="a7"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@package</span><span class="src-doc"> PHPonTraxTest</span></li>
<li><a name="a8"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@license</span><span class="src-doc"> http://opensource.org/licenses/gpl-license.php GNU Public License</span></li>
<li><a name="a9"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@copyright</span><span class="src-doc"> (c) Walter O. Haas 2006</span></li>
<li><a name="a10"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@version</span><span class="src-doc"> $Id: TraxGeneratorTest.php 198 2006-04-20 16:20:30Z haas $</span></li>
<li><a name="a11"></a><span class="src-doc"> * </span><span class="src-doc-coretag">@author</span><span class="src-doc"> Walt Haas &lt;hide@address.com&gt;</span></li>
<li><a name="a12"></a><span class="src-doc"> */</span></li>
<li><a name="a13"></a>&nbsp;</li>
<li><a name="a14"></a>echo <span class="src-str">&quot;testing TraxGenerator\n&quot;</span><span class="src-sym">;</span></li>
<li><a name="a15"></a><span class="src-inc">require_once </span><span class="src-str">'testenv.php'</span><span class="src-sym">;</span></li>
<li><a name="a16"></a><span class="src-inc">require_once </span><span class="src-str">'inflector.php'</span><span class="src-sym">;</span></li>
<li><a name="a17"></a>&nbsp;</li>
<li><a name="a18"></a><span class="src-comm">// Call TraxGeneratorTest::main() if this source file is executed directly.</span></li>
<li><a name="a19"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/defined">defined</a><span class="src-sym">(</span><span class="src-str">&quot;PHPUnit2_MAIN_METHOD&quot;</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a20"></a>    <a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">&quot;PHPUnit2_MAIN_METHOD&quot;</span><span class="src-sym">, </span><span class="src-str">&quot;TraxGeneratorTest::main&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a21"></a><span class="src-sym">}</span></li>
<li><a name="a22"></a>&nbsp;</li>
<li><a name="a23"></a><span class="src-inc">require_once </span><span class="src-str">&quot;PHPUnit2/Framework/TestCase.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a24"></a><span class="src-inc">require_once </span><span class="src-str">&quot;PHPUnit2/Framework/TestSuite.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a25"></a>&nbsp;</li>
<li><a name="a26"></a><span class="src-comm">// You may remove the following line when all tests have been implemented.</span></li>
<li><a name="a27"></a><span class="src-inc">require_once </span><span class="src-str">&quot;PHPUnit2/Framework/IncompleteTestError.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a28"></a>&nbsp;</li>
<li><a name="a29"></a><span class="src-key">static </span><span class="src-var">$tmpdir</span><span class="src-sym">;            </span><span class="src-comm">// temporary directory</span></li>
<li><a name="a30"></a>&nbsp;</li>
<li><a name="a31"></a><span class="src-comm">//  Create a temporary directory to receive generated files</span></li>
<li><a name="a32"></a><span class="src-comm">//  @todo &lt;b&gt;FIXME:&lt;/b&gt; Is this platform independent?</span></li>
<li><a name="a33"></a>do <span class="src-sym">{</span></li>
<li><a name="a34"></a>    <span class="src-var">$tmpdir </span>= <span class="src-str">'/tmp/traxtest' </span>. <a href="http://www.php.net/mt_rand">mt_rand</a><span class="src-sym">(</span><span class="src-num">0</span><span class="src-sym">, </span><span class="src-num">99999999</span><span class="src-sym">) </span>. <span class="src-str">'/'</span><span class="src-sym">;</span></li>
<li><a name="a35"></a> <span class="src-sym">} </span><span class="src-key">while </span><span class="src-sym">(</span><span class="src-sym">!</span><a href="http://www.php.net/mkdir">mkdir</a><span class="src-sym">(</span><span class="src-var">$tmpdir</span><span class="src-sym">,</span><span class="src-num">0700</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a36"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'TRAX_ROOT'</span><span class="src-sym">, </span><span class="src-var">$tmpdir</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a37"></a>&nbsp;</li>
<li><a name="a38"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'TRAX_MODE'</span><span class="src-sym">, </span><span class="src-str">'test'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a39"></a>&nbsp;</li>
<li><a name="a40"></a><span class="src-comm">//  Directories where Trax stores things</span></li>
<li><a name="a41"></a><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'TRAX_INCLUDES'</span><span class="src-sym">] </span>= <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'controllers' </span>=&gt; <span class="src-str">'controllers'</span><span class="src-sym">,</span></li>
<li><a name="a42"></a>                                 <span class="src-str">'helpers' </span>=&gt; <span class="src-str">'helpers'</span><span class="src-sym">,</span></li>
<li><a name="a43"></a>                                 <span class="src-str">'models' </span>=&gt; <span class="src-str">'models'</span><span class="src-sym">,</span></li>
<li><a name="a44"></a>                                 <span class="src-str">'views' </span>=&gt; <span class="src-str">'views'</span><span class="src-sym">,</span></li>
<li><a name="a45"></a>                                 <span class="src-str">'layouts' </span>=&gt; <span class="src-str">'views/layouts'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a46"></a>&nbsp;</li>
<li><a name="a47"></a><span class="src-comm">// Set up information that normally comes from database.ini</span></li>
<li><a name="a48"></a><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'TRAX_DB_SETTINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'test'</span><span class="src-sym">]</span></li>
<li><a name="a49"></a>            = <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'phptype'    </span>=&gt; <span class="src-str">'mysql'</span><span class="src-sym">,</span></li>
<li><a name="a50"></a>                    <span class="src-str">'database'   </span>=&gt; <span class="src-str">'test_development'</span><span class="src-sym">,</span></li>
<li><a name="a51"></a>                    <span class="src-str">'hostspec'   </span>=&gt; <span class="src-str">'localhost'</span><span class="src-sym">,</span></li>
<li><a name="a52"></a>                    <span class="src-str">'username'   </span>=&gt; <span class="src-str">'root'</span><span class="src-sym">,</span></li>
<li><a name="a53"></a>                    <span class="src-str">'password'   </span>=&gt; <span class="src-str">''</span><span class="src-sym">,</span></li>
<li><a name="a54"></a>                    <span class="src-str">'persistent' </span>=&gt; <span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a55"></a>&nbsp;</li>
<li><a name="a56"></a><span class="src-comm">//  Create a DB to test with</span></li>
<li><a name="a57"></a><span class="src-sym">@</span><a href="http://www.php.net/ini_set">ini_set</a><span class="src-sym">(</span><span class="src-str">'include_path'</span><span class="src-sym">,</span><span class="src-str">'./mockDB:'</span>.<a href="http://www.php.net/ini_get">ini_get</a><span class="src-sym">(</span><span class="src-str">'include_path'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a58"></a><span class="src-inc">require_once </span><span class="src-str">&quot;DB.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a59"></a><span class="src-var">$db </span>=<span class="src-sym">&amp;  </span><span class="src-id"><a href="../PHPonTraxTest/DB.html">DB</a></span><span class="src-sym">::</span><span class="src-id">Connect</span><span class="src-sym">(</span><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'TRAX_DB_SETTINGS'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'test'</span><span class="src-sym">]</span><span class="src-sym">,</span></li>
<li><a name="a60"></a>                    <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'persistent' </span>=&gt; <span class="src-id">true</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a61"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">PEAR</span><span class="src-sym">::</span><span class="src-id">isError</span><span class="src-sym">(</span><span class="src-var">$db</span><span class="src-sym">) </span>|| <a href="http://www.php.net/is_a">is_a</a><span class="src-sym">(</span><span class="src-var">$db</span><span class="src-sym">, </span><span class="src-str">'DB_Error'</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a62"></a>    <span class="src-id">PHPUnit2_Framework_Assert</span><span class="src-sym">::</span><span class="src-id">fail</span><span class="src-sym">(</span><span class="src-str">&quot;Unable to create database&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a63"></a> <span class="src-sym">}</span></li>
<li><a name="a64"></a><span class="src-var">$db</span><span class="src-sym">-&gt;</span><span class="src-id">setFetchMode</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_mockDB_DB_php.html#defineDB_FETCHMODE_ASSOC">DB_FETCHMODE_ASSOC</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a65"></a><span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'ACTIVE_RECORD_DB'</span><span class="src-sym">] </span>= <span class="src-var">$db</span><span class="src-sym">;</span></li>
<li><a name="a66"></a>&nbsp;</li>
<li><a name="a67"></a><a href="http://www.php.net/define">define</a><span class="src-sym">(</span><span class="src-str">'TRAX_VIEWS_EXTENTION'</span><span class="src-sym">, </span><span class="src-str">'phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a68"></a>&nbsp;</li>
<li><a name="a69"></a><span class="src-inc">require_once </span><span class="src-str">&quot;trax_generator.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a70"></a><span class="src-inc">require_once </span><span class="src-str">&quot;action_view/helpers.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a71"></a><span class="src-inc">require_once </span><span class="src-str">&quot;action_view/helpers/active_record_helper.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a72"></a><span class="src-inc">require_once </span><span class="src-str">&quot;active_record.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a73"></a><span class="src-inc">require_once </span><span class="src-str">&quot;trax_exceptions.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a74"></a>&nbsp;</li>
<li><a name="a75"></a><span class="src-doc">/**</span></li>
<li><a name="a76"></a><span class="src-doc"> *  When a class is referenced, get it from app/models</span></li>
<li><a name="a77"></a><span class="src-doc"> */</span></li>
<li><a name="a78"></a><span class="src-key">function </span><a href="../PHPonTraxTest/_test_TraxGeneratorTest_php.html#function__autoload">__autoload</a><span class="src-sym">(</span><span class="src-var">$class_name</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a79"></a>    <span class="src-var">$file </span>= <span class="src-id"><a href="../PHPonTrax/Inflector.html">Inflector</a></span><span class="src-sym">::</span><a href="../PHPonTrax/Inflector.html#methodunderscore">underscore</a><span class="src-sym">(</span><span class="src-var">$class_name</span><span class="src-sym">)</span>.<span class="src-str">&quot;.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a80"></a>    <span class="src-var">$file_org </span>= <span class="src-var">$class_name</span>.<span class="src-str">&quot;.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a81"></a>&nbsp;</li>
<li><a name="a82"></a>    <span class="src-key">if</span><span class="src-sym">(</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'TRAX_INCLUDES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'models'</span><span class="src-sym">]</span>.<span class="src-str">&quot;</span><span class="src-str">/<span class="src-var">$file</span></span><span class="src-str">&quot;</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a83"></a><span class="src-comm"># Include model classes</span></li>
<li><a name="a84"></a>        <span class="src-inc">include_once</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-var">$GLOBALS</span><span class="src-sym">[</span><span class="src-str">'TRAX_INCLUDES'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-str">'models'</span><span class="src-sym">]</span>.<span class="src-str">&quot;</span><span class="src-str">/<span class="src-var">$file</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a85"></a>    <span class="src-sym">} </span><span class="src-key">elseif</span><span class="src-sym">(</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_testenv_php.html#defineTRAX_LIB_ROOT">TRAX_LIB_ROOT</a></span>.<span class="src-str">&quot;</span><span class="src-str">/<span class="src-var">$file</span></span><span class="src-str">&quot;</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a86"></a><span class="src-comm"># Include extra controller classes</span></li>
<li><a name="a87"></a>        <span class="src-inc">include_once</span><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_testenv_php.html#defineTRAX_LIB_ROOT">TRAX_LIB_ROOT</a></span>.<span class="src-str">&quot;</span><span class="src-str">/<span class="src-var">$file</span></span><span class="src-str">&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a88"></a>    <span class="src-sym">}</span></li>
<li><a name="a89"></a><span class="src-sym">}</span></li>
<li><a name="a90"></a>&nbsp;</li>
<li><a name="a91"></a><span class="src-doc">/**</span></li>
<li><a name="a92"></a><span class="src-doc"> * Test class for TraxGenerator.</span></li>
<li><a name="a93"></a><span class="src-doc"> * Generated by PHPUnit2_Util_Skeleton on 2006-03-01 at 15:34:17.</span></li>
<li><a name="a94"></a><span class="src-doc"> */</span></li>
<li><a name="a95"></a><span class="src-key">class </span><a href="../PHPonTraxTest/TraxGeneratorTest.html">TraxGeneratorTest</a> <span class="src-key">extends </span><span class="src-id">PHPUnit2_Framework_TestCase </span><span class="src-sym">{</span></li>
<li><a name="a96"></a>&nbsp;</li>
<li><a name="a97"></a>&nbsp;</li>
<li><a name="a98"></a>    <span class="src-doc">/**</span></li>
<li><a name="a99"></a><span class="src-doc">     * Runs the test methods of this class.</span></li>
<li><a name="a100"></a><span class="src-doc">     *</span></li>
<li><a name="a101"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@access</span><span class="src-doc"> public</span></li>
<li><a name="a102"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@static</span></li>
<li><a name="a103"></a><span class="src-doc">     */</span></li>
<li><a name="a104"></a>    <span class="src-key">public </span><span class="src-key">static </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodmain">main</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a105"></a>        <span class="src-inc">require_once </span><span class="src-str">&quot;PHPUnit2/TextUI/TestRunner.php&quot;</span><span class="src-sym">;</span></li>
<li><a name="a106"></a>&nbsp;</li>
<li><a name="a107"></a>        <span class="src-var">$suite  </span>= <span class="src-key">new </span><span class="src-id">PHPUnit2_Framework_TestSuite</span><span class="src-sym">(</span><span class="src-str">&quot;TraxGeneratorTest&quot;</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a108"></a>        <span class="src-var">$result </span>= <span class="src-id">PHPUnit2_TextUI_TestRunner</span><span class="src-sym">::</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-var">$suite</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a109"></a>    <span class="src-sym">}</span></li>
<li><a name="a110"></a>&nbsp;</li>
<li><a name="a111"></a>    <span class="src-doc">/**</span></li>
<li><a name="a112"></a><span class="src-doc">     *  Set up dummy Trax work area</span></li>
<li><a name="a113"></a><span class="src-doc">     *</span></li>
<li><a name="a114"></a><span class="src-doc">     *  Create a dummy Trax work area in the temporary directory</span></li>
<li><a name="a115"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a116"></a><span class="src-doc">     */</span></li>
<li><a name="a117"></a>    <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodsetUp">setUp</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a118"></a>&nbsp;</li>
<li><a name="a119"></a>        <span class="src-comm">//  Create empty directories representing the Trax work area</span></li>
<li><a name="a120"></a>        <a href="http://www.php.net/mkdir">mkdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-str">'controllers'</span><span class="src-sym">,</span><span class="src-num">0700</span><span class="src-sym">,</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a121"></a>        <a href="http://www.php.net/mkdir">mkdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-str">'helpers'</span><span class="src-sym">,</span><span class="src-num">0700</span><span class="src-sym">,</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a122"></a>        <a href="http://www.php.net/mkdir">mkdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-str">'models'</span><span class="src-sym">,</span><span class="src-num">0700</span><span class="src-sym">,</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a123"></a>        <a href="http://www.php.net/mkdir">mkdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span>.<span class="src-str">'views/layouts'</span><span class="src-sym">,</span><span class="src-num">0700</span><span class="src-sym">,</span><span class="src-id">true</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a124"></a>    <span class="src-sym">}</span></li>
<li><a name="a125"></a>&nbsp;</li>
<li><a name="a126"></a>    <span class="src-doc">/**</span></li>
<li><a name="a127"></a><span class="src-doc">     *  Remove the dummy Trax work area</span></li>
<li><a name="a128"></a><span class="src-doc">     *</span></li>
<li><a name="a129"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@access</span><span class="src-doc"> protected</span></li>
<li><a name="a130"></a><span class="src-doc">     */</span></li>
<li><a name="a131"></a>    <span class="src-key">protected </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtearDown">tearDown</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a132"></a>&nbsp;</li>
<li><a name="a133"></a>        <span class="src-comm">//  Empty the temporary directory</span></li>
<li><a name="a134"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodrmrfdir">rmrfdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a135"></a>    <span class="src-sym">}</span></li>
<li><a name="a136"></a>&nbsp;</li>
<li><a name="a137"></a>    <span class="src-doc">/**</span></li>
<li><a name="a138"></a><span class="src-doc">     *  Remove all the contents of a directory</span></li>
<li><a name="a139"></a><span class="src-doc">     *  </span><span class="src-doc-coretag">@param </span><span class="src-doc-type">string </span><span class="src-doc-var">$dir </span><span class="src-doc">Name of directory to empty. Ends with '/'</span></li>
<li><a name="a140"></a><span class="src-doc">     */</span></li>
<li><a name="a141"></a>    <span class="src-key">private </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodrmrfdir">rmrfdir</a><span class="src-sym">(</span><span class="src-var">$dir</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a142"></a>&nbsp;</li>
<li><a name="a143"></a>        <span class="src-comm">//  Open the directory</span></li>
<li><a name="a144"></a>        <span class="src-var">$dir_h </span>= <a href="http://www.php.net/opendir">opendir</a><span class="src-sym">(</span><span class="src-var">$dir</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a145"></a>&nbsp;</li>
<li><a name="a146"></a>        <span class="src-key">if </span><span class="src-sym">(</span><span class="src-sym">!</span><span class="src-var">$dir_h</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a147"></a>            <span class="src-key">return</span><span class="src-sym">;             </span><span class="src-comm">// </span></li>
<li><a name="a148"></a>        <span class="src-sym">}</span></li>
<li><a name="a149"></a>&nbsp;</li>
<li><a name="a150"></a>        <span class="src-comm">//  Delete everything in the directory</span></li>
<li><a name="a151"></a>        <span class="src-key">while </span><span class="src-sym">(</span><span class="src-id">false </span>!== <span class="src-sym">(</span><span class="src-var">$item </span>= <a href="http://www.php.net/readdir">readdir</a><span class="src-sym">(</span><span class="src-var">$dir_h</span><span class="src-sym">))) </span><span class="src-sym">{</span></li>
<li><a name="a152"></a>            <span class="src-key">if </span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-var">$dir</span>.<span class="src-var">$item</span><span class="src-sym">)) </span><span class="src-sym">{</span></li>
<li><a name="a153"></a>&nbsp;</li>
<li><a name="a154"></a>                <span class="src-comm">//  $item is a directory.  Recurse if appropriate</span></li>
<li><a name="a155"></a>                <span class="src-key">if </span><span class="src-sym">( (</span><span class="src-var">$item </span>!= <span class="src-str">'.'</span><span class="src-sym">) </span>&amp;&amp; <span class="src-sym">(</span><span class="src-var">$item </span>!= <span class="src-str">'..'</span><span class="src-sym">) ) </span><span class="src-sym">{</span></li>
<li><a name="a156"></a>                    <span class="src-var">$this</span><span class="src-sym">-&gt;</span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodrmrfdir">rmrfdir</a><span class="src-sym">(</span><span class="src-var">$dir</span>.<span class="src-var">$item</span>.<span class="src-str">'/'</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">// empty the directory</span></li>
<li><a name="a157"></a>                    <a href="http://www.php.net/rmdir">rmdir</a><span class="src-sym">(</span><span class="src-var">$dir</span>.<span class="src-var">$item</span><span class="src-sym">)</span><span class="src-sym">; </span><span class="src-comm">// remove the empty directory</span></li>
<li><a name="a158"></a>                <span class="src-sym">}</span></li>
<li><a name="a159"></a>            <span class="src-sym">} </span><span class="src-key">else </span><span class="src-sym">{            </span><span class="src-comm">// if (is_dir($item))</span></li>
<li><a name="a160"></a>&nbsp;</li>
<li><a name="a161"></a>                <span class="src-comm">//  $item is not a directory.</span></li>
<li><a name="a162"></a>                <a href="http://www.php.net/unlink">unlink</a><span class="src-sym">(</span><span class="src-var">$dir</span>.<span class="src-var">$item</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a163"></a>            <span class="src-sym">}                   </span><span class="src-comm">// if (is_dir($item)) ... else</span></li>
<li><a name="a164"></a>        <span class="src-sym">}                       </span><span class="src-comm">// while (false !== ($item = readdir($dir_h)))</span></li>
<li><a name="a165"></a>&nbsp;</li>
<li><a name="a166"></a>        <span class="src-comm">//  Close the directory</span></li>
<li><a name="a167"></a>        <a href="http://www.php.net/closedir">closedir</a><span class="src-sym">(</span><span class="src-var">$dir_h</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a168"></a>    <span class="src-sym">}</span></li>
<li><a name="a169"></a>&nbsp;</li>
<li><a name="a170"></a>&nbsp;</li>
<li><a name="a171"></a>    <span class="src-doc">/**</span></li>
<li><a name="a172"></a><span class="src-doc">     *  Verify that generator_help() outputs a &quot;Usage&quot; message</span></li>
<li><a name="a173"></a><span class="src-doc">     */</span></li>
<li><a name="a174"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerator_help">testGenerator_help</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a175"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a176"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a177"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generator_help</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a178"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a179"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a180"></a>    <span class="src-sym">}</span></li>
<li><a name="a181"></a>&nbsp;</li>
<li><a name="a182"></a>    <span class="src-doc">/**</span></li>
<li><a name="a183"></a><span class="src-doc">     *  Verify that scaffold_help() outputs a &quot;Usage&quot; message</span></li>
<li><a name="a184"></a><span class="src-doc">     */</span></li>
<li><a name="a185"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestScaffold_help">testScaffold_help</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a186"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a187"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a188"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">scaffold_help</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a189"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a190"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a191"></a>    <span class="src-sym">}</span></li>
<li><a name="a192"></a>&nbsp;</li>
<li><a name="a193"></a>    <span class="src-doc">/**</span></li>
<li><a name="a194"></a><span class="src-doc">     *  Verify that controller_help() outputs a &quot;Usage&quot; message</span></li>
<li><a name="a195"></a><span class="src-doc">     */</span></li>
<li><a name="a196"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestController_help">testController_help</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a197"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a198"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a199"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">controller_help</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a200"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a201"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a202"></a>    <span class="src-sym">}</span></li>
<li><a name="a203"></a>&nbsp;</li>
<li><a name="a204"></a>    <span class="src-doc">/**</span></li>
<li><a name="a205"></a><span class="src-doc">     *  Verify that model_help() outputs a &quot;Usage&quot; message</span></li>
<li><a name="a206"></a><span class="src-doc">     */</span></li>
<li><a name="a207"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestModel_help">testModel_help</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a208"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a209"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a210"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">model_help</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a211"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a212"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a213"></a>    <span class="src-sym">}</span></li>
<li><a name="a214"></a>&nbsp;</li>
<li><a name="a215"></a>    <span class="src-doc">/**</span></li>
<li><a name="a216"></a><span class="src-doc">     *  Verify that generate_controller() generates a controller</span></li>
<li><a name="a217"></a><span class="src-doc">     *</span></li>
<li><a name="a218"></a><span class="src-doc">     *  We would like to test</span></li>
<li><a name="a219"></a><span class="src-doc">     *  </span><span class="src-doc-inlinetag">{@link TraxGenerator::create_controller() create_controller()}</span><span class="src-doc">,</span></li>
<li><a name="a220"></a><span class="src-doc">     *  </span><span class="src-doc-inlinetag">{@link TraxGenerator::create_helper() create_helper()}</span></li>
<li><a name="a221"></a><span class="src-doc">     *  and </span><span class="src-doc-inlinetag">{@link TraxGenerator::create_view() create_view()}</span><span class="src-doc"> in</span></li>
<li><a name="a222"></a><span class="src-doc">     *  isolation before we test</span></li>
<li><a name="a223"></a><span class="src-doc">     *  </span><span class="src-doc-inlinetag">{@link TraxGenerator::generate_controller() generate_controller()}</span></li>
<li><a name="a224"></a><span class="src-doc">     *  but that's impossible because they depend on private variables</span></li>
<li><a name="a225"></a><span class="src-doc">     *  which are set only in generate_controller().</span></li>
<li><a name="a226"></a><span class="src-doc">     */</span></li>
<li><a name="a227"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_controller">testGenerate_controller</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a228"></a>&nbsp;</li>
<li><a name="a229"></a>        <span class="src-comm">//  Generate a mumble controller with no views</span></li>
<li><a name="a230"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a231"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a232"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_controller</span><span class="src-sym">(</span><span class="src-str">'mumble'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a233"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a234"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a235"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a236"></a>                                  . <span class="src-str">'controllers/mumble_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a237"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a238"></a>                                        . <span class="src-str">'controllers/mumble_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a239"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class MumbleController extends'</span></li>
<li><a name="a240"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a241"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a242"></a>                                  . <span class="src-str">'helpers/mumble_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a243"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/mumble'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a244"></a>&nbsp;</li>
<li><a name="a245"></a>        <span class="src-comm">//  Verify that a second attempt to create the same controller</span></li>
<li><a name="a246"></a>        <span class="src-comm">//  reports that it exists</span></li>
<li><a name="a247"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a248"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a249"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_controller</span><span class="src-sym">(</span><span class="src-str">'mumble'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a250"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a251"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'exists'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a252"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/file_exists">file_exists</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a253"></a>                                      . <span class="src-str">'controllers/mumble_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a254"></a>        </li>
<li><a name="a255"></a>        <span class="src-comm">//  Generate a controller with one view file</span></li>
<li><a name="a256"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a257"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a258"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_controller</span><span class="src-sym">(</span><span class="src-str">'store'</span><span class="src-sym">, </span><span class="src-str">'manager'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a259"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a260"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a261"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a262"></a>                                  . <span class="src-str">'controllers/store_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a263"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a264"></a>                                        . <span class="src-str">'controllers/store_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a265"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class StoreController extends'</span></li>
<li><a name="a266"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a267"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a268"></a>                                  . <span class="src-str">'helpers/store_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a269"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/store'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a270"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a271"></a>                                  . <span class="src-str">'views/store/manager.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a272"></a>        <span class="src-var">$view </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/store/manager.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a273"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Store-&gt;manager'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a274"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'store/manager.phtml'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a275"></a>        </li>
<li><a name="a276"></a>        <span class="src-comm">//  Generate a controller with two view files</span></li>
<li><a name="a277"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a278"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a279"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_controller</span><span class="src-sym">(</span><span class="src-str">'account'</span><span class="src-sym">, </span><span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'customer'</span><span class="src-sym">,</span><span class="src-str">'teller'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a280"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a281"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a282"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a283"></a>                                  . <span class="src-str">'controllers/account_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a284"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a285"></a>                                   . <span class="src-str">'controllers/account_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a286"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class AccountController extends'</span></li>
<li><a name="a287"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a288"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a289"></a>                                  . <span class="src-str">'helpers/account_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a290"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/account'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a291"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a292"></a>                                  . <span class="src-str">'views/account/customer.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a293"></a>        <span class="src-var">$view </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/account/customer.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a294"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Account-&gt;customer'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a295"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'account/customer.phtml'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a296"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a297"></a>                                  . <span class="src-str">'views/account/teller.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a298"></a>        <span class="src-var">$view </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/account/teller.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a299"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Account-&gt;teller'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a300"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'account/teller.phtml'</span><span class="src-sym">,</span><span class="src-var">$view</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a301"></a>&nbsp;</li>
<li><a name="a302"></a>        <span class="src-comm">//  Generate a controller in a subdirectory</span></li>
<li><a name="a303"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a304"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a305"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_controller</span><span class="src-sym">(</span><span class="src-str">'forum/admin'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a306"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a307"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a308"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a309"></a>                                . <span class="src-str">'controllers/forum/admin_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a310"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a311"></a>                                 . <span class="src-str">'controllers/forum/admin_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a312"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class AdminController extends'</span></li>
<li><a name="a313"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a314"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a315"></a>                                  . <span class="src-str">'helpers/forum/admin_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a316"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/forum/admin'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a317"></a>    <span class="src-sym">}</span></li>
<li><a name="a318"></a>&nbsp;</li>
<li><a name="a319"></a>    <span class="src-doc">/**</span></li>
<li><a name="a320"></a><span class="src-doc">     *  Verify that generate_model() generates a model</span></li>
<li><a name="a321"></a><span class="src-doc">     */</span></li>
<li><a name="a322"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_model">testGenerate_model</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a323"></a>&nbsp;</li>
<li><a name="a324"></a>        <span class="src-comm">//  Generate a CreditCard model</span></li>
<li><a name="a325"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a326"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a327"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_model</span><span class="src-sym">(</span><span class="src-str">'CreditCard'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a328"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a329"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a330"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'models/credit_card.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a331"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'models/credit_card.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a332"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class CreditCard extends ActiveRecord'</span><span class="src-sym">,</span></li>
<li><a name="a333"></a>                              <span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a334"></a>&nbsp;</li>
<li><a name="a335"></a>        <span class="src-comm">//  Generate a soap_opera model</span></li>
<li><a name="a336"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a337"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a338"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_model</span><span class="src-sym">(</span><span class="src-str">'soap_opera'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a339"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a340"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a341"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'models/soap_opera.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a342"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'models/soap_opera.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a343"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class SoapOpera extends ActiveRecord'</span><span class="src-sym">,</span></li>
<li><a name="a344"></a>                              <span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a345"></a>    <span class="src-sym">}</span></li>
<li><a name="a346"></a>&nbsp;</li>
<li><a name="a347"></a>    <span class="src-doc">/**</span></li>
<li><a name="a348"></a><span class="src-doc">     *  Verify that generate_scaffold() generates a model and controller</span></li>
<li><a name="a349"></a><span class="src-doc">     */</span></li>
<li><a name="a350"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_scaffold1">testGenerate_scaffold1</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a351"></a>&nbsp;</li>
<li><a name="a352"></a>        <span class="src-comm">//  Generate a PersonName/membership scaffold</span></li>
<li><a name="a353"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a354"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a355"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_scaffold</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-str">'membership'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a356"></a>&nbsp;</li>
<li><a name="a357"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a358"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a359"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a360"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a361"></a>&nbsp;</li>
<li><a name="a362"></a>        <span class="src-comm">//  verify controller</span></li>
<li><a name="a363"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a364"></a>                                  . <span class="src-str">'controllers/membership_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a365"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a366"></a>                                  . <span class="src-str">'controllers/membership_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a367"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class MembershipController extends'</span></li>
<li><a name="a368"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a369"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a370"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a371"></a>&nbsp;</li>
<li><a name="a372"></a>        <span class="src-comm">//  verify model</span></li>
<li><a name="a373"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a374"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a375"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a376"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a377"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class PersonName extends'</span></li>
<li><a name="a378"></a>                              . <span class="src-str">' ActiveRecord'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a379"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a380"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a381"></a>&nbsp;</li>
<li><a name="a382"></a>        <span class="src-comm">//  verify helper</span></li>
<li><a name="a383"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a384"></a>                                  . <span class="src-str">'helpers/membership_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a385"></a>        <span class="src-var">$helper </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a386"></a>                                  . <span class="src-str">'helpers/membership_helper.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a387"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'MembershipController'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a388"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a389"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a390"></a>&nbsp;</li>
<li><a name="a391"></a>        <span class="src-comm">//  verify views</span></li>
<li><a name="a392"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a393"></a>&nbsp;</li>
<li><a name="a394"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/add.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a395"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a396"></a>                                  . <span class="src-str">'views/membership/add.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a397"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'New PersonName'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a398"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a399"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a400"></a>&nbsp;</li>
<li><a name="a401"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/edit.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a402"></a>        <span class="src-var">$edit </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a403"></a>                                  . <span class="src-str">'views/membership/edit.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a404"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Editing PersonName'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a405"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a406"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a407"></a>&nbsp;</li>
<li><a name="a408"></a>&nbsp;</li>
<li><a name="a409"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/_form.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a410"></a>        <span class="src-var">$_form </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a411"></a>                                  . <span class="src-str">'views/membership/_form.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a412"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a413"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a414"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a415"></a>&nbsp;</li>
<li><a name="a416"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/index.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a417"></a>        <span class="src-var">$index </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a418"></a>                                  . <span class="src-str">'views/membership/index.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a419"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Listing PersonNames'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a420"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a421"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a422"></a>&nbsp;</li>
<li><a name="a423"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/show.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a424"></a>        <span class="src-var">$show </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a425"></a>                                  . <span class="src-str">'views/membership/show.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a426"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a427"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a428"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a429"></a>&nbsp;</li>
<li><a name="a430"></a>        <span class="src-comm">//  verify layout</span></li>
<li><a name="a431"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a432"></a>                                  . <span class="src-str">'views/layouts/membership.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a433"></a>        <span class="src-var">$layout </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a434"></a>                                  . <span class="src-str">'views/layouts/membership.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a435"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'membership'</span><span class="src-sym">, </span><span class="src-var">$layout</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a436"></a>    <span class="src-sym">}</span></li>
<li><a name="a437"></a>&nbsp;</li>
<li><a name="a438"></a>    <span class="src-doc">/**</span></li>
<li><a name="a439"></a><span class="src-doc">     *  Verify that generate_scaffold() defaults controller from model</span></li>
<li><a name="a440"></a><span class="src-doc">     */</span></li>
<li><a name="a441"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_scaffold2">testGenerate_scaffold2</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a442"></a>&nbsp;</li>
<li><a name="a443"></a>        <span class="src-comm">//  Generate a PersonName/person_name scaffold</span></li>
<li><a name="a444"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a445"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a446"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_scaffold</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">,</span><span class="src-id">null</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a447"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a448"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a449"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a450"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a451"></a>&nbsp;</li>
<li><a name="a452"></a>        <span class="src-comm">//  verify controller</span></li>
<li><a name="a453"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a454"></a>                                  . <span class="src-str">'controllers/person_name_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a455"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a456"></a>                                  . <span class="src-str">'controllers/person_name_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a457"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class PersonNameController extends'</span></li>
<li><a name="a458"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a459"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a460"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a461"></a>&nbsp;</li>
<li><a name="a462"></a>        <span class="src-comm">//  verify model</span></li>
<li><a name="a463"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a464"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a465"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a466"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a467"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class PersonName extends'</span></li>
<li><a name="a468"></a>                              . <span class="src-str">' ActiveRecord'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a469"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a470"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a471"></a>&nbsp;</li>
<li><a name="a472"></a>        <span class="src-comm">//  verify helper</span></li>
<li><a name="a473"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a474"></a>                                  . <span class="src-str">'helpers/person_name_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a475"></a>        <span class="src-var">$helper </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a476"></a>                                  . <span class="src-str">'helpers/person_name_helper.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a477"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonNameController'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a478"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a479"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a480"></a>&nbsp;</li>
<li><a name="a481"></a>        <span class="src-comm">//  verify views</span></li>
<li><a name="a482"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/person_name'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a483"></a>&nbsp;</li>
<li><a name="a484"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/person_name/add.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a485"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a486"></a>                                  . <span class="src-str">'views/person_name/add.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a487"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'New PersonName'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a488"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a489"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a490"></a>&nbsp;</li>
<li><a name="a491"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/person_name/edit.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a492"></a>        <span class="src-var">$edit </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a493"></a>                                  . <span class="src-str">'views/person_name/edit.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a494"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Editing PersonName'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a495"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a496"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a497"></a>&nbsp;</li>
<li><a name="a498"></a>&nbsp;</li>
<li><a name="a499"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a500"></a>                                  . <span class="src-str">'views/person_name/_form.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a501"></a>        <span class="src-var">$_form </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a502"></a>                                  . <span class="src-str">'views/person_name/_form.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a503"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a504"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a505"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a506"></a>&nbsp;</li>
<li><a name="a507"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a508"></a>                                  . <span class="src-str">'views/person_name/index.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a509"></a>        <span class="src-var">$index </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a510"></a>                                  . <span class="src-str">'views/person_name/index.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a511"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Listing PersonNames'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a512"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a513"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a514"></a>&nbsp;</li>
<li><a name="a515"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/person_name/show.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a516"></a>        <span class="src-var">$show </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a517"></a>                                  . <span class="src-str">'views/person_name/show.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a518"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a519"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a520"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a521"></a>&nbsp;</li>
<li><a name="a522"></a>        <span class="src-comm">//  verify layout</span></li>
<li><a name="a523"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a524"></a>                                  . <span class="src-str">'views/layouts/person_name.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a525"></a>        <span class="src-var">$layout </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a526"></a>                                  . <span class="src-str">'views/layouts/person_name.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a527"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'person_name'</span><span class="src-sym">, </span><span class="src-var">$layout</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a528"></a>    <span class="src-sym">}</span></li>
<li><a name="a529"></a>&nbsp;</li>
<li><a name="a530"></a>    <span class="src-doc">/**</span></li>
<li><a name="a531"></a><span class="src-doc">     *  Verify generate_scaffold() with additional views</span></li>
<li><a name="a532"></a><span class="src-doc">     */</span></li>
<li><a name="a533"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_scaffold3">testGenerate_scaffold3</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a534"></a>&nbsp;</li>
<li><a name="a535"></a>        <span class="src-comm">//  Generate a PersonName/membership scaffold</span></li>
<li><a name="a536"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a537"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a538"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_scaffold</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-str">'membership'</span><span class="src-sym">,</span></li>
<li><a name="a539"></a>                               <span class="src-key">array</span><span class="src-sym">(</span><span class="src-str">'join'</span><span class="src-sym">, </span><span class="src-str">'renew'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a540"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a541"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a542"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a543"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a544"></a>&nbsp;</li>
<li><a name="a545"></a>        <span class="src-comm">//  verify controller</span></li>
<li><a name="a546"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a547"></a>                                  . <span class="src-str">'controllers/membership_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a548"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a549"></a>                                  . <span class="src-str">'controllers/membership_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a550"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class MembershipController extends'</span></li>
<li><a name="a551"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a552"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a553"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a554"></a>&nbsp;</li>
<li><a name="a555"></a>        <span class="src-comm">//  verify model</span></li>
<li><a name="a556"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a557"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a558"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a559"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a560"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class PersonName extends'</span></li>
<li><a name="a561"></a>                              . <span class="src-str">' ActiveRecord'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a562"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a563"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a564"></a>&nbsp;</li>
<li><a name="a565"></a>        <span class="src-comm">//  verify helper</span></li>
<li><a name="a566"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a567"></a>                                  . <span class="src-str">'helpers/membership_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a568"></a>        <span class="src-var">$helper </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a569"></a>                                  . <span class="src-str">'helpers/membership_helper.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a570"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'MembershipController'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a571"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a572"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a573"></a>&nbsp;</li>
<li><a name="a574"></a>        <span class="src-comm">//  verify views</span></li>
<li><a name="a575"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a576"></a>&nbsp;</li>
<li><a name="a577"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/add.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a578"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a579"></a>                                  . <span class="src-str">'views/membership/add.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a580"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'New PersonName'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a581"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a582"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a583"></a>&nbsp;</li>
<li><a name="a584"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/edit.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a585"></a>        <span class="src-var">$edit </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a586"></a>                                  . <span class="src-str">'views/membership/edit.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a587"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Editing PersonName'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a588"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a589"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a590"></a>&nbsp;</li>
<li><a name="a591"></a>&nbsp;</li>
<li><a name="a592"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/_form.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a593"></a>        <span class="src-var">$_form </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a594"></a>                                  . <span class="src-str">'views/membership/_form.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a595"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a596"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a597"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a598"></a>&nbsp;</li>
<li><a name="a599"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/index.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a600"></a>        <span class="src-var">$index </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a601"></a>                                  . <span class="src-str">'views/membership/index.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a602"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Listing PersonNames'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a603"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a604"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a605"></a>&nbsp;</li>
<li><a name="a606"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/show.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a607"></a>        <span class="src-var">$show </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a608"></a>                                  . <span class="src-str">'views/membership/show.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a609"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a610"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a611"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a612"></a>&nbsp;</li>
<li><a name="a613"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/join.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a614"></a>        <span class="src-var">$join </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a615"></a>                                  . <span class="src-str">'views/membership/join.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a616"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Membership-&gt;join'</span><span class="src-sym">, </span><span class="src-var">$join</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a617"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$join</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a618"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$join</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a619"></a>&nbsp;</li>
<li><a name="a620"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/renew.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a621"></a>        <span class="src-var">$renew </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a622"></a>                                  . <span class="src-str">'views/membership/renew.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a623"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Membership-&gt;renew'</span><span class="src-sym">, </span><span class="src-var">$renew</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a624"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$renew</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a625"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$renew</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a626"></a>&nbsp;</li>
<li><a name="a627"></a>        <span class="src-comm">//  verify layout</span></li>
<li><a name="a628"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a629"></a>                                  . <span class="src-str">'views/layouts/membership.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a630"></a>        <span class="src-var">$layout </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a631"></a>                                  . <span class="src-str">'views/layouts/membership.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a632"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'membership'</span><span class="src-sym">, </span><span class="src-var">$layout</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a633"></a>    <span class="src-sym">}</span></li>
<li><a name="a634"></a>&nbsp;</li>
<li><a name="a635"></a>    <span class="src-doc">/**</span></li>
<li><a name="a636"></a><span class="src-doc">     *  Verify generate_scaffold() with the controller in a subdirectory</span></li>
<li><a name="a637"></a><span class="src-doc">     */</span></li>
<li><a name="a638"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestGenerate_scaffold4">testGenerate_scaffold4</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a639"></a>&nbsp;</li>
<li><a name="a640"></a>        <span class="src-comm">//  Generate a PersonName/membership scaffold</span></li>
<li><a name="a641"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a642"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a643"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">generate_scaffold</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-str">'admin/membership'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a644"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a645"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a646"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a647"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a648"></a>&nbsp;</li>
<li><a name="a649"></a>        <span class="src-comm">//  verify controller</span></li>
<li><a name="a650"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a651"></a>                            . <span class="src-str">'controllers/admin/membership_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a652"></a>        <span class="src-var">$controller </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a653"></a>                            . <span class="src-str">'controllers/admin/membership_controller.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a654"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class MembershipController extends'</span></li>
<li><a name="a655"></a>                              . <span class="src-str">' ApplicationController'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a656"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a657"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$controller</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a658"></a>&nbsp;</li>
<li><a name="a659"></a>        <span class="src-comm">//  verify model</span></li>
<li><a name="a660"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a661"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a662"></a>        <span class="src-var">$model </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a663"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a664"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'class PersonName extends'</span></li>
<li><a name="a665"></a>                              . <span class="src-str">' ActiveRecord'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a666"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a667"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$model</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a668"></a>&nbsp;</li>
<li><a name="a669"></a>        <span class="src-comm">//  verify helper</span></li>
<li><a name="a670"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a671"></a>                                  . <span class="src-str">'helpers/admin/membership_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a672"></a>        <span class="src-var">$helper </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a673"></a>                                  . <span class="src-str">'helpers/admin/membership_helper.php'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a674"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'MembershipController'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a675"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a676"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$helper</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a677"></a>&nbsp;</li>
<li><a name="a678"></a>        <span class="src-comm">//  verify views</span></li>
<li><a name="a679"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/admin/membership'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a680"></a>&nbsp;</li>
<li><a name="a681"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a682"></a>                                  . <span class="src-str">'views/admin/membership/add.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a683"></a>        <span class="src-var">$add </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a684"></a>                                  . <span class="src-str">'views/admin/membership/add.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a685"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'New PersonName'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a686"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a687"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$add</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a688"></a>&nbsp;</li>
<li><a name="a689"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a690"></a>                                  . <span class="src-str">'views/admin/membership/edit.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a691"></a>        <span class="src-var">$edit </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a692"></a>                                  . <span class="src-str">'views/admin/membership/edit.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a693"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Editing PersonName'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a694"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a695"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$edit</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a696"></a>&nbsp;</li>
<li><a name="a697"></a>&nbsp;</li>
<li><a name="a698"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a699"></a>                                  . <span class="src-str">'views/admin/membership/_form.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a700"></a>        <span class="src-var">$_form </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a701"></a>                                  . <span class="src-str">'views/admin/membership/_form.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a702"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a703"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a704"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$_form</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a705"></a>&nbsp;</li>
<li><a name="a706"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a707"></a>                                  . <span class="src-str">'views/admin/membership/index.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a708"></a>        <span class="src-var">$index </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a709"></a>                                  . <span class="src-str">'views/admin/membership/index.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a710"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Listing PersonNames'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a711"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a712"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$index</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a713"></a>&nbsp;</li>
<li><a name="a714"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a715"></a>                                  . <span class="src-str">'views/admin/membership/show.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a716"></a>        <span class="src-var">$show </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a717"></a>                                  . <span class="src-str">'views/admin/membership/show.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a718"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'PersonName'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a719"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a720"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$show</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a721"></a>&nbsp;</li>
<li><a name="a722"></a>        <span class="src-comm">//  verify layout</span></li>
<li><a name="a723"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a724"></a>                                  . <span class="src-str">'views/layouts/admin/membership.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a725"></a>        <span class="src-var">$layout </span>= <a href="http://www.php.net/file_get_contents">file_get_contents</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a726"></a>                                  . <span class="src-str">'views/layouts/admin/membership.phtml'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a727"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'membership'</span><span class="src-sym">, </span><span class="src-var">$layout</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a728"></a>    <span class="src-sym">}</span></li>
<li><a name="a729"></a>&nbsp;</li>
<li><a name="a730"></a>    <span class="src-doc">/**</span></li>
<li><a name="a731"></a><span class="src-doc">     *   Test fix_php_brackets()</span></li>
<li><a name="a732"></a><span class="src-doc">     */</span></li>
<li><a name="a733"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestFix_php_brackets">testFix_php_brackets</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a734"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a735"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertEquals</span><span class="src-sym">(</span><span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">fix_php_brackets</span><span class="src-sym">(</span><span class="src-str">'&lt; ?php foo ? &gt;'</span><span class="src-sym">)</span><span class="src-sym">,</span></li>
<li><a name="a736"></a>                            <span class="src-str">'&lt;?php foo ?&gt;'</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a737"></a>    <span class="src-sym">}</span></li>
<li><a name="a738"></a>&nbsp;</li>
<li><a name="a739"></a>    <span class="src-doc">/**</span></li>
<li><a name="a740"></a><span class="src-doc">     * </span><span class="src-doc-coretag">@todo</span><span class="src-doc"> Implement testRun().</span></li>
<li><a name="a741"></a><span class="src-doc">     */</span></li>
<li><a name="a742"></a>    <span class="src-key">public </span><span class="src-key">function </span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodtestRun">testRun</a><span class="src-sym">(</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a743"></a>&nbsp;</li>
<li><a name="a744"></a>        <span class="src-comm">//  Verify that no command produces usage message</span></li>
<li><a name="a745"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a746"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a747"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a748"></a>        <span class="src-var">$result </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a749"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a750"></a>&nbsp;</li>
<li><a name="a751"></a>        <span class="src-comm">//  Verify that unknown command produces usage message</span></li>
<li><a name="a752"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-str">'foo'</span><span class="src-sym">;</span></li>
<li><a name="a753"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a754"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a755"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;             </span><span class="src-comm">// should produce a usage</span></li>
<li><a name="a756"></a>        <span class="src-var">$result </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a757"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'Usage'</span><span class="src-sym">, </span><span class="src-var">$result</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a758"></a>&nbsp;</li>
<li><a name="a759"></a>        <span class="src-comm">//  Generate a CreditCard model</span></li>
<li><a name="a760"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-str">'model'</span><span class="src-sym">;</span></li>
<li><a name="a761"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span>= <span class="src-str">'CreditCard'</span><span class="src-sym">;</span></li>
<li><a name="a762"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a763"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a764"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a765"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a766"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a767"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'models/credit_card.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a768"></a>&nbsp;</li>
<li><a name="a769"></a>        <span class="src-comm">//  Generate a mumble controller with no views</span></li>
<li><a name="a770"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-str">'controller'</span><span class="src-sym">;</span></li>
<li><a name="a771"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span>= <span class="src-str">'mumble'</span><span class="src-sym">;</span></li>
<li><a name="a772"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a773"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a774"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a775"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a776"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a777"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a778"></a>                                  . <span class="src-str">'controllers/mumble_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a779"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a780"></a>                                  . <span class="src-str">'helpers/mumble_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a781"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/mumble'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a782"></a>&nbsp;</li>
<li><a name="a783"></a>&nbsp;</li>
<li><a name="a784"></a>        <span class="src-comm">//  Generate a PersonName/membership scaffold</span></li>
<li><a name="a785"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">1</span><span class="src-sym">] </span>= <span class="src-str">'scaffold'</span><span class="src-sym">;</span></li>
<li><a name="a786"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">2</span><span class="src-sym">] </span>= <span class="src-str">'PersonName'</span><span class="src-sym">;</span></li>
<li><a name="a787"></a>        <span class="src-var">$_SERVER</span><span class="src-sym">[</span><span class="src-str">'argv'</span><span class="src-sym">]</span><span class="src-sym">[</span><span class="src-num">3</span><span class="src-sym">] </span>= <span class="src-str">'membership'</span><span class="src-sym">;</span></li>
<li><a name="a788"></a>        <span class="src-var">$tg </span>= <span class="src-key">new </span><span class="src-id"><a href="../PHPonTrax/TraxGenerator.html">TraxGenerator</a></span><span class="src-sym">;</span></li>
<li><a name="a789"></a>        <a href="http://www.php.net/ob_start">ob_start</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a790"></a>        <span class="src-var">$tg</span><span class="src-sym">-&gt;</span><span class="src-id">run</span><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a791"></a>        <span class="src-var">$output </span>= <a href="http://www.php.net/ob_get_clean">ob_get_clean</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a792"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertContains</span><span class="src-sym">(</span><span class="src-str">'create'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a793"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Error:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a794"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertNotContains</span><span class="src-sym">(</span><span class="src-str">'Notice:'</span><span class="src-sym">, </span><span class="src-var">$output</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a795"></a>&nbsp;</li>
<li><a name="a796"></a>        <span class="src-comm">//  verify controller</span></li>
<li><a name="a797"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a798"></a>                                  . <span class="src-str">'controllers/membership_controller.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a799"></a>&nbsp;</li>
<li><a name="a800"></a>        <span class="src-comm">//  verify model</span></li>
<li><a name="a801"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a802"></a>                                  . <span class="src-str">'models/person_name.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a803"></a>&nbsp;</li>
<li><a name="a804"></a>        <span class="src-comm">//  verify helper</span></li>
<li><a name="a805"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a806"></a>                                  . <span class="src-str">'helpers/membership_helper.php'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a807"></a>&nbsp;</li>
<li><a name="a808"></a>        <span class="src-comm">//  verify views</span></li>
<li><a name="a809"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_dir">is_dir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a810"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/add.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a811"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/edit.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a812"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/_form.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a813"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/index.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a814"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a> </span>. <span class="src-str">'views/membership/show.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a815"></a>&nbsp;</li>
<li><a name="a816"></a>        <span class="src-comm">//  verify layout</span></li>
<li><a name="a817"></a>        <span class="src-var">$this</span><span class="src-sym">-&gt;</span><span class="src-id">assertTrue</span><span class="src-sym">(</span><a href="http://www.php.net/is_file">is_file</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span></li>
<li><a name="a818"></a>                                  . <span class="src-str">'views/layouts/membership.phtml'</span><span class="src-sym">))</span><span class="src-sym">;</span></li>
<li><a name="a819"></a>    <span class="src-sym">}</span></li>
<li><a name="a820"></a><span class="src-sym">}</span></li>
<li><a name="a821"></a>&nbsp;</li>
<li><a name="a822"></a><span class="src-comm">// Call TraxGeneratorTest::main() if this source file is executed directly.</span></li>
<li><a name="a823"></a><span class="src-key">if </span><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_FormOptionsHelperTest_php.html#definePHPUnit2_MAIN_METHOD">PHPUnit2_MAIN_METHOD</a> </span>== <span class="src-str">&quot;TraxGeneratorTest::main&quot;</span><span class="src-sym">) </span><span class="src-sym">{</span></li>
<li><a name="a824"></a>    <span class="src-id"><a href="../PHPonTraxTest/TraxGeneratorTest.html">TraxGeneratorTest</a></span><span class="src-sym">::</span><a href="../PHPonTraxTest/TraxGeneratorTest.html#methodmain">main</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a825"></a><span class="src-sym">}</span></li>
<li><a name="a826"></a>&nbsp;</li>
<li><a name="a827"></a><span class="src-comm">//  Clean up temp directory when done</span></li>
<li><a name="a828"></a><a href="http://www.php.net/rmdir">rmdir</a><span class="src-sym">(</span><span class="src-id"><a href="../PHPonTraxTest/_test_HelpersTest_php.html#defineTRAX_ROOT">TRAX_ROOT</a></span><span class="src-sym">)</span><span class="src-sym">;</span></li>
<li><a name="a829"></a>&nbsp;</li>
<li><a name="a830"></a><span class="src-comm">// -- set Emacs parameters --</span></li>
<li><a name="a831"></a><span class="src-comm">// Local variables:</span></li>
<li><a name="a832"></a><span class="src-comm">// tab-width: 4</span></li>
<li><a name="a833"></a><span class="src-comm">// c-basic-offset: 4</span></li>
<li><a name="a834"></a><span class="src-comm">// c-hanging-comment-ender-p: nil</span></li>
<li><a name="a835"></a><span class="src-comm">// indent-tabs-mode: nil</span></li>
<li><a name="a836"></a><span class="src-comm">// End:</span></li>
<li><a name="a837"></a><span class="src-php">?&gt;</span></li>
</ol></pre></div>
</div>
        <div class="credit">
		    <hr />
		    Documentation generated on Thu, 04 May 2006 19:48:00 -0600 by <a href="http://www.phpdoc.org">phpDocumentor 1.3.0RC4</a>
	      </div>
      </td></tr></table>
    </td>
  </tr>
</table>

</body>
</html>
Return current item: PHP on Trax