/iaLib/ia_examples/PushId_example.php
<?php
$ia_example = [
'title' => 'PushId', // fully qualified className
'summary' => '', // class summary
'full_example' => '', // full usage example, relative path from ia_examples, blank '' not shown.
'example_file' => 'code/PushId_example_code.php', // method by method example, blank '' not shown.
];
include( __DIR__ . '/template/ia_example_class.php');
/iaLib/ia_examples/code/PushId_example_code.php
/**
* Usage examples for PushId
* @version 1.0
* @date 2026-01
*/
use ia\DocumentIt\DocumentIt;
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 '<ul class="usage">';
///////// PushId::generate(); //////////////////////////////////////////////////
echo <<< FUNCTIONDEF
<li id='u_generate'><b>PushId::generate() <span>: string</span></b>
FUNCTIONDEF;
echo "<pre class='docBlock'>".DocumentIt::methodDocBlockProtected("PushId", "generate")."</pre>";
echo "<ol class='usage'>";
/// display ///
echo <<< DOCUMENT_EXAMPLE
<li>PushId::generate(); ->
DOCUMENT_EXAMPLE;
/// run ///
echo PushId::generate();
echo '</ol>';
/* PerfilExample adds new methods here */
echo '</ul>';
} catch(Exception $exception) { echo "<pre class='errorBlock'>$exception</pre>"; }
phpunit test file template
<?php
use PushId;
use PHPUnit\Framework\TestCase;
class PushIdTest extends TestCase {
/**
* @dataProvider generate_Provider
*
*/
public function test_generate( $expected) {
$this->assertEquals($expected, PushId::generate() );
}
function generate_Provider() {
return [
'test 1' => [ '' ],
];
}
}
ia Doc