From 2830b5fb96cce787ca8c7562a968effc3e57bdb1 Mon Sep 17 00:00:00 2001 From: Silvino Date: Wed, 26 Jun 2019 16:58:13 +0100 Subject: dev index re-organization --- dev/php/hello.html | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 dev/php/hello.html (limited to 'dev/php/hello.html') diff --git a/dev/php/hello.html b/dev/php/hello.html new file mode 100644 index 0000000..cc0f82a --- /dev/null +++ b/dev/php/hello.html @@ -0,0 +1,83 @@ + + + + + PHP - Hello + + + PHP Index + +

Hello World

+ +

PHP comes with a built in server that helps to speed up + developing by not having to configure a system web server, + first create file index.php;

+ +
+        <?php
+           echo "Hello World";
+        
+ +

Now run the server;

+ +
+        $ php -S localhost:8000
+        
+ +

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
+       
+ + PHP Index +

+ This is part of the Hive System Documentation. + Copyright (C) 2018 + Hive Team. + See the file Gnu Free Documentation License + for copying conditions.

+ + -- cgit 1.4.1-2-gfad0