Posted By


steroidmonkey on 11/09/13

Tagged


Statistics


Viewed 36 times
Favorited by 0 user(s)

PHPUnit Test Outline


/ Published in: PHP
Save to your folder(s)

Bare outline for a PHPUnit test case


Copy this code and paste it in your HTML
  1. <?php
  2. require_once 'MyClass.php';
  3.  
  4. class MyClassTest extends PHPUnit_Framework_TestCase
  5. {
  6. protected $my_class_instance;
  7.  
  8. protected function setUp()
  9. {
  10. $this->my_class_instance = new MyClass;
  11. }
  12.  
  13. public function testYourTest()
  14. {
  15. //Write your assertions here.
  16. }
  17.  
  18. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.