/iaLib/ia_examples/ia/Work/Workflow/WF_DisplayTable_example.php
<?php
$ia_example = [
'title' => 'ia\Work\Workflow\WF_DisplayTable', // fully qualified className
'summary' => '', // class summary
'full_example' => '', // full usage example, relative path from ia_examples, blank '' not shown.
'example_file' => 'code/ia/Work/Workflow/WF_DisplayTable_example_code.php', // method by method example, blank '' not shown.
];
include( __DIR__ . '/../../../template/ia_example_class.php');
/iaLib/ia_examples/code/ia/Work/Workflow/WF_DisplayTable_example_code.php
use ia\Work\Workflow\WF_DisplayTable;
use ia\DocumentIt\DocumentIt;
echo '<h3>Disclaimer: Auto generated file.
Please help us setting parameters to useful values and extending the examples.
</h3>';
try {
echo <<< CONSTRUCTOR_PROTOTYPE
<pre>
/*
\$wF_DisplayTable = new WF_DisplayTable();
*/
\$wF_DisplayTable = new WF_DisplayTable();
</pre>
CONSTRUCTOR_PROTOTYPE;
$wF_DisplayTable = new WF_DisplayTable();
echo '<ul class="usage">';
///////// WF_DisplayTable::get_css(); //////////////////////////////////////////////////
echo <<< FUNCTIONDEF
<li id='u_get_css'><b>WF_DisplayTable::get_css() <span>: </span></b>
FUNCTIONDEF;
echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\WF_DisplayTable", "get_css")."</pre>";
echo "<ol class='usage'>";
/// display ///
echo <<< DOCUMENT_EXAMPLE
<li>WF_DisplayTable::get_css();
-> </b><br><pre>
DOCUMENT_EXAMPLE;
/// run ///
print_r(
WF_DisplayTable::get_css()
);
echo "</pre>";
echo '</ol>';
///////// \$wF_DisplayTable->tableDated('palabra'); //////////////////////////////////////////////////
echo <<< FUNCTIONDEF
<li id='u_tableDated'><b>\$wF_DisplayTable->tableDated(<span class="type">* @return string
</span> \$datedWorkflow) <span>: string</span></b>
FUNCTIONDEF;
echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\WF_DisplayTable", "tableDated")."</pre>";
echo "<ol class='usage'>";
/// display ///
echo <<< DOCUMENT_EXAMPLE
<li>\$wF_DisplayTable->tableDated('palabra'); ->
DOCUMENT_EXAMPLE;
/// run ///
echo $wF_DisplayTable->tableDated('palabra');
echo '</ol>';
///////// \$wF_DisplayTable->tableNums(null /* == */); //////////////////////////////////////////////////
echo <<< FUNCTIONDEF
<li id='u_tableNums'><b>\$wF_DisplayTable->tableNums(<span class="type"></span> \$activityList) <span>: </span></b>
FUNCTIONDEF;
echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\WF_DisplayTable", "tableNums")."</pre>";
echo "<ol class='usage'>";
/// display ///
echo <<< DOCUMENT_EXAMPLE
<li>\$wF_DisplayTable->tableNums(null /* == */);
-> </b><br><pre>
DOCUMENT_EXAMPLE;
/// run ///
print_r(
$wF_DisplayTable->tableNums(null /* == */)
);
echo "</pre>";
echo '</ol>';
/* PerfilExample adds new methods here */
echo '</ul>';
} catch(Exception $exception) { echo "<pre class='errorBlock'>$exception</pre>"; }
phpunit test file template
<?php
use ia\Work\Workflow\WF_DisplayTable;
use PHPUnit\Framework\TestCase;
class WF_DisplayTableTest extends TestCase {
/**
* @dataProvider get_css_Provider
*
*/
public function test_get_css( $expected) {
$this->assertEquals($expected, WF_DisplayTable::get_css() );
}
function get_css_Provider() {
return [
'test 1' => [ '' ],
];
}
/**
* @dataProvider tableDated_Provider
*
*/
public function test_tableDated($datedWorkflow , $expected) {
$wF_DisplayTable = new WF_DisplayTable();
$this->assertEquals($expected, $wF_DisplayTable->tableDated($datedWorkflow) );
}
function tableDated_Provider() {
return [
'test 1' => [ '', '' ],
];
}
/**
* @dataProvider tableNums_Provider
*
*/
public function test_tableNums($activityList , $expected) {
$wF_DisplayTable = new WF_DisplayTable();
$this->assertEquals($expected, $wF_DisplayTable->tableNums($activityList) );
}
function tableNums_Provider() {
return [
'test 1' => [ '', '' ],
];
}
}
ia Doc