about summary refs log tree commit diff stats
path: root/dev/php/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'dev/php/index.html')
-rw-r--r--dev/php/index.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/dev/php/index.html b/dev/php/index.html
index a4549f1..45e8f79 100644
--- a/dev/php/index.html
+++ b/dev/php/index.html
@@ -30,6 +30,51 @@
         <p>Open your browser and browse http://localhost:8000,
         you should see "Hello World".</p>
 
+        <h2 id="profiling">Profiling</h2>
+
+        <h2 id="testing">Testing</h2>
+
+        <p>Create folder tests for phpunit files with settings, inside
+        create another called tests to create tests to be performed on
+        the code.</p>
+
+        <pre>
+        $ mkdir -p tests/tests
+        $ cd tests
+        </pre>
+
+        <p>Create a test tests/EngineTest.php;</p>
+
+       <pre>
+       &lt;?php
+        declare(strict_types=1);
+
+        use PHPUnit\Framework\TestCase;
+
+        final class EngineTest extends TestCase {
+
+            public function testCanBeCreated(){
+
+                   $engine = new engine();
+
+                   $this-&gt;assertInstanceOf(engine::class, $engine);
+
+            }
+        }
+       </pre>
+
+        <p>Create phpunit.xml;</p>
+
+       <pre>
+       $ phpunit --generate-configuration
+       </pre>
+
+       <p>Run the test;</p>
+
+       <pre>
+       $ phpunit
+       </pre>
+
         <a href="../index.html">Development Index</a>
         <p>
         This is part of the c9-doc Manual.