From e558bcea087aded1cdfac8870f6115e0f4db266b Mon Sep 17 00:00:00 2001 From: Silvino Silva Date: Tue, 3 Apr 2018 16:48:07 +0100 Subject: dev php testing --- dev/php/index.html | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) (limited to 'dev/php/index.html') 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 @@

Open your browser and browse http://localhost:8000, you should see "Hello World".

+

Profiling

+ +

Testing

+ +

Create folder tests for phpunit files with settings, inside + create another called tests to create tests to be performed on + the code.

+ +
+        $ mkdir -p tests/tests
+        $ cd tests
+        
+ +

Create a test tests/EngineTest.php;

+ +
+       <?php
+        declare(strict_types=1);
+
+        use PHPUnit\Framework\TestCase;
+
+        final class EngineTest extends TestCase {
+
+            public function testCanBeCreated(){
+
+                   $engine = new engine();
+
+                   $this->assertInstanceOf(engine::class, $engine);
+
+            }
+        }
+       
+ +

Create phpunit.xml;

+ +
+       $ phpunit --generate-configuration
+       
+ +

Run the test;

+ +
+       $ phpunit
+       
+ Development Index

This is part of the c9-doc Manual. -- cgit 1.4.1-2-gfad0