Informática Asociada ia doc & examples: templates Documentation Index Examples List


/iaLib/ia_examples/ia/Work/Workflow/wfx_example.php


<?php $ia_example = [ 'title' => 'ia\Work\Workflow\wfx', // 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/wfx_example_code.php', // method by method example, blank '' not shown. ]; include( __DIR__ . '/../../../template/ia_example_class.php');

/iaLib/ia_examples/code/ia/Work/Workflow/wfx_example_code.php


use ia\Work\Workflow\wfx; 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> /* \$wfx = new wfx(); */ \$wfx = new wfx(); </pre> CONSTRUCTOR_PROTOTYPE; $wfx = new wfx(); echo '<ul class="usage">'; ///////// \$wfx->get_activitiesEnd(); ////////////////////////////////////////////////// echo <<< FUNCTIONDEF <li id='u_get_activitiesEnd'><b>\$wfx->get_activitiesEnd() <span>: </span></b> FUNCTIONDEF; echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\wfx", "get_activitiesEnd")."</pre>"; echo "<ol class='usage'>"; /// display /// echo <<< DOCUMENT_EXAMPLE <li>\$wfx->get_activitiesEnd(); -&gt;&nbsp; </b><br><pre> DOCUMENT_EXAMPLE; /// run /// print_r( $wfx->get_activitiesEnd() ); echo "</pre>"; echo '</ol>'; ///////// \$wfx->get_activitiesStart(); ////////////////////////////////////////////////// echo <<< FUNCTIONDEF <li id='u_get_activitiesStart'><b>\$wfx->get_activitiesStart() <span>: </span></b> FUNCTIONDEF; echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\wfx", "get_activitiesStart")."</pre>"; echo "<ol class='usage'>"; /// display /// echo <<< DOCUMENT_EXAMPLE <li>\$wfx->get_activitiesStart(); -&gt;&nbsp; </b><br><pre> DOCUMENT_EXAMPLE; /// run /// print_r( $wfx->get_activitiesStart() ); echo "</pre>"; echo '</ol>'; ///////// \$wfx->get_activityList(); ////////////////////////////////////////////////// echo <<< FUNCTIONDEF <li id='u_get_activityList'><b>\$wfx->get_activityList() <span>: </span></b> FUNCTIONDEF; echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("ia\Work\Workflow\wfx", "get_activityList")."</pre>"; echo "<ol class='usage'>"; /// display /// echo <<< DOCUMENT_EXAMPLE <li>\$wfx->get_activityList(); -&gt;&nbsp; </b><br><pre> DOCUMENT_EXAMPLE; /// run /// print_r( $wfx->get_activityList() ); 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\wfx; use PHPUnit\Framework\TestCase; class wfxTest extends TestCase { /** * @dataProvider get_activitiesEnd_Provider * */ public function test_get_activitiesEnd( $expected) { $wfx = new wfx(); $this->assertEquals($expected, $wfx->get_activitiesEnd() ); } function get_activitiesEnd_Provider() { return [ 'test 1' => [ '' ], ]; } /** * @dataProvider get_activitiesStart_Provider * */ public function test_get_activitiesStart( $expected) { $wfx = new wfx(); $this->assertEquals($expected, $wfx->get_activitiesStart() ); } function get_activitiesStart_Provider() { return [ 'test 1' => [ '' ], ]; } /** * @dataProvider get_activityList_Provider * */ public function test_get_activityList( $expected) { $wfx = new wfx(); $this->assertEquals($expected, $wfx->get_activityList() ); } function get_activityList_Provider() { return [ 'test 1' => [ '' ], ]; } }

ia Doc