Giter Club home page Giter Club logo

phpunit-template-bulk's Introduction

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)
  {

  }

}
?>

phpunit-template-bulk's People

Contributors

modnar1226 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.