Skip to content

Create templates for phpunit testing | returns a single layered array | recursive | linux |

Notifications You must be signed in to change notification settings

modnar1226/phpunit-template-bulk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

phpunit-template-bulk

Create templates for phpunit testing | recursive | linux | codeigniter 3.0 |

STEP 1:

doJob('your/file/path/containing/php/files/');

STEP 2:

Open folder UnitTestsAutoGen/

Inside will be a clone of the directory structure with template files cloned from existing classes and functions. Only files that contain classes and or functions will be cloned.

The files are named and written to be ready to test via phpunit. The only thing they need is for you to write the tests for your code inside the templates.

Example file being read:

<?php

class Hello extends CI_Controller{
  public function index()
  {
   	#code ...
  }

  private function test1()
  {
  	#code ...
  }

  protected function test2()
  {
  	#code ...
  } 

  private static function test3($param1, $param2)
  {
  	#code ...
  }

  public static function test4($param1, $param2)
  {
  	#code ...
  }

  protected static function test5($param1, $param2)
  {
  	#code ...
  }
}

Example output file:

<?php
/**
 *
 */
class HelloTest extends TestCase
{
  /**
   *
   */
  public function testIndex()
  {

  }

  /**
   *
   */
  private function testTest1()
  {

  }

  /**
   *
   */
  protected function testTest2()
  {

  }

  /**
   *
   */
  private static function testTest3($param1, $param2)
  {

  }

  /**
   *
   */
  public static function testTest4($param1, $param2)
  {

  }

  /**
   *
   */
  protected static function testTest5($param1, $param2)
  {

  }

}
?>

About

Create templates for phpunit testing | returns a single layered array | recursive | linux |

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages