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/index.html | 98 ++++++++++++++---------------------------------------- 1 file changed, 25 insertions(+), 73 deletions(-) (limited to 'dev/php/index.html') diff --git a/dev/php/index.html b/dev/php/index.html index fdb2b09..fb25bcf 100644 --- a/dev/php/index.html +++ b/dev/php/index.html @@ -2,89 +2,41 @@ - c9 PHP + PHP Development Index -

c9 PHP

- - -

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

+ + + + + Development Index

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

- - - - -- cgit 1.4.1-2-gfad0