Permalink
Browse files

Start working on v2.0.

  • Loading branch information...
1 parent f239c49 commit d4f835cda3a232a01f2c056d3cdbf59f2ecfeb02 @NSinopoli NSinopoli committed Jun 8, 2012
Showing with 8,182 additions and 16,133 deletions.
  1. +16 −33 CHANGELOG.rst → CHANGELOG.md
  2. +1 −1 LICENSE
  3. +44 −0 README.md
  4. +0 −71 README.rst
  5. +35 −0 app/config/Routes.php
  6. +33 −0 app/config/bootstrap.php
  7. +18 −0 app/controller/FileList.php
  8. +116 −0 app/controller/Graph.php
  9. +32 −0 app/controller/Home.php
  10. +142 −0 app/core/Controller.php
  11. +63 −0 app/core/View.php
  12. +82 −0 app/lib/Compiler.php
  13. +46 −0 app/lib/Connections.php
  14. +296 −0 app/lib/PDO_MySQL.php
  15. +568 −0 app/lib/VPU.php
  16. +808 −0 app/public/css/bootstrap-responsive.css
  17. +4,966 −0 app/public/css/bootstrap.css
  18. BIN app/public/img/glyphicons-halflings-white.png
  19. BIN app/public/img/glyphicons-halflings.png
  20. +7 −0 app/public/index.php
  21. 0 errors/errors.tmp → app/resource/cache/template_view_file_index___.html
  22. +182 −0 app/resource/cache/template_view_graph_index_1339187212_7350869_5704.html
  23. +243 −0 app/resource/cache/template_view_home_index_1339181278_7212836_9840.html
  24. 0 {tests → app/test}/DateTest.php
  25. 0 {tests → app/test}/IncompleteTest.php
  26. 0 {tests → app/test}/PUTest.php
  27. 0 {tests → app/test}/PUTest2.php
  28. 0 {tests → app/test}/SkippedTest.php
  29. +20 −0 app/test/sample_dir/IncompleteTest2.php
  30. +19 −0 app/test/sample_dir/PUTest3.php
  31. +19 −0 app/test/sample_dir/PUTest4.php
  32. +182 −0 app/view/graph/index.html
  33. +243 −0 app/view/home/index.html
  34. +0 −92 config.php
  35. +0 −284 history/2011-11-04_14-50.html
  36. +0 −177 index.php
  37. +0 −511 lib/PDO_MySQL.php
  38. +0 −834 lib/VPU.php
  39. +0 −34 migrations/01_CREATE_SCHEMA
  40. +1 −0 nx
  41. +0 −28 ui/css/graph.css
  42. BIN ui/css/images/application.png
  43. BIN ui/css/images/code.png
  44. BIN ui/css/images/css.png
  45. BIN ui/css/images/db.png
  46. BIN ui/css/images/directory.png
  47. BIN ui/css/images/doc.png
  48. BIN ui/css/images/file.png
  49. BIN ui/css/images/film.png
  50. BIN ui/css/images/flash.png
  51. BIN ui/css/images/folder_open.png
  52. BIN ui/css/images/html.png
  53. BIN ui/css/images/java.png
  54. BIN ui/css/images/linux.png
  55. BIN ui/css/images/music.png
  56. BIN ui/css/images/pdf.png
  57. BIN ui/css/images/php.png
  58. BIN ui/css/images/picture.png
  59. BIN ui/css/images/ppt.png
  60. BIN ui/css/images/psd.png
  61. BIN ui/css/images/ruby.png
  62. BIN ui/css/images/script.png
  63. BIN ui/css/images/spinner.gif
  64. BIN ui/css/images/txt.png
  65. BIN ui/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  66. BIN ui/css/images/ui-bg_diagonals-thick_20_666666_40x40.png
  67. BIN ui/css/images/ui-bg_flat_10_000000_40x100.png
  68. BIN ui/css/images/ui-bg_glass_100_f6f6f6_1x400.png
  69. BIN ui/css/images/ui-bg_glass_100_fdf5ce_1x400.png
  70. BIN ui/css/images/ui-bg_glass_65_ffffff_1x400.png
  71. BIN ui/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  72. BIN ui/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  73. BIN ui/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  74. BIN ui/css/images/ui-icons_222222_256x240.png
  75. BIN ui/css/images/ui-icons_228ef1_256x240.png
  76. BIN ui/css/images/ui-icons_ef8c08_256x240.png
  77. BIN ui/css/images/ui-icons_ffd27a_256x240.png
  78. BIN ui/css/images/ui-icons_ffffff_256x240.png
  79. BIN ui/css/images/xls.png
  80. BIN ui/css/images/zip.png
  81. +0 −470 ui/css/index.css
  82. +0 −362 ui/css/jquery-ui-1.8.11.custom.css
  83. +0 −92 ui/css/jqueryFileTree.css
  84. +0 −6 ui/error.html
  85. +0 −55 ui/graph.json
  86. +0 −25 ui/header.html
  87. BIN ui/images/loading.gif
  88. +0 −466 ui/index.html
  89. +0 −162 ui/js/Highcharts-2.1.4/highcharts.js
  90. +0 −10,671 ui/js/Highcharts-2.1.4/highcharts.src.js
  91. +0 −21 ui/js/Highcharts-2.1.4/modules/exporting.js
  92. +0 −673 ui/js/Highcharts-2.1.4/modules/exporting.src.js
  93. +0 −170 ui/js/Highcharts-2.1.4/themes/dark-blue.js
  94. +0 −170 ui/js/Highcharts-2.1.4/themes/dark-green.js
  95. +0 −164 ui/js/Highcharts-2.1.4/themes/gray.js
  96. +0 −97 ui/js/Highcharts-2.1.4/themes/grid.js
  97. +0 −16 ui/js/jquery-1.5.1.min.js
  98. +0 −148 ui/js/jquery-ui-1.8.11.custom.min.js
  99. +0 −25 ui/js/jquery.sortElements.js
  100. +0 −48 ui/js/jqueryFileTree/connectors/jqueryFileTree.php
  101. +0 −128 ui/js/jqueryFileTree/jqueryFileTree.js
  102. +0 −68 ui/stats.html
  103. +0 −12 ui/suite.html
  104. +0 −19 ui/test.html
@@ -1,100 +1,83 @@
-Changelog
-=========
+# Changelog
-v1.5.5
-------
+## v1.5.5
* Change require -> require_once to avoid errors (GH-34)
* Don't require files to share the same name as the test classes (GH-33)
* Fix output buffering (GH-23)
-v1.5.4
-------
+## v1.5.4
* Fix include_path issues (GH-26)
-v1.5.3
-------
+## v1.5.3
* Fix SANDBOX_IGNORE settings (GH-21)
* Update history file (GH-20)
-v1.5.2
-------
+## v1.5.2
* Add tooltips to compensate for colorblind usage problem (GH-17)
* Add ability to filter suite results (GH-14)
-v1.5.1
-------
+## v1.5.1
* Update color scheme
* Update snapshot list each time a test is run (GH-10)
* Fix snapshot filenames to be compatible with Windows systems (GH-11)
* Allow debug display of JSON within tests (GH-9)
* Fix POST locations to use relative URIs
-v1.5
-----
+## v1.5
* Add ability to generate graphs of test results
-v1.4.1
-------
+## v1.4.1
* Fix Windows path issues
* Add a progress bar to indicate that tests are being processed
-v1.4
-----
+## v1.4
* Overhaul the UI
* Fix issues with namespaced tests
* Implement a better check for archived files
-v1.3.2
-------
+## v1.3.2
* Add support for bootstraps
* Clean up the user interface
* Add the ability to view snapshots from the homepage
* Change the snapshot filename format to Y-m-d
-v1.3.1
-------
+## v1.3.1
* Allow for relative paths in TEST_DIRECTORY
* Use a better test loading mechanism
-v1.3
-----
+## v1.3
* Add a start page to allow for specific choosing of tests and options
* Add the ability to sort suite results by status and time
* Clean up some configuration settings
* Remove ability to save JSON snapshots
-v1.2
-----
+## v1.2
* Add statistic bars to display the suite results visually
-v1.1.1
-------
+## v1.1.1
* Fix to allow for loading a single test directly
* Adjust code to allow for proper execution with 'short_open_tag' off
* Fix to match test files with the word 'Test' at the end of the filename
* Fix to eliminate duplicate tests
-v1.1
-----
+## v1.1
* Add suite statistics
-v1.0
-----
+## v1.0
* Initial release
-
View
@@ -1,6 +1,6 @@
VisualPHPUnit
-Copyright (c) 2011, Nick Sinopoli <nsinopoli@gmail.com>.
+Copyright (c) 2011-2012, Nick Sinopoli <nsinopoli@gmail.com>.
All rights reserved.
Redistribution and use in source and binary forms, with or without
View
@@ -0,0 +1,44 @@
+# VisualPHPUnit
+
+VisualPHPUnit is a visual front-end for PHPUnit. Written in PHP, it aims to make unit testing more appealing.
+
+## Features
+
+VisualPHPUnit provides the following features:
+
+* A stunning front-end which organizes test and suite results
+* The ability to view unit testing progress via graphs
+* An option to maintain a history of unit test results through the use of visual logs
+* Enumeration of PHPUnit statistics and messages
+* Convenient display of any debug messages written within unit tests
+* Sandboxing of PHP errors/exceptions
+
+## Screenshots
+
+TODO
+
+## Requirements
+
+VisualPHPUnit only supports PHPUnit v3.5 and above.
+
+## Installation
+
+TODO
+
+## Configuration (optional)
+
+TODO
+
+## Version Information
+
+TODO
+
+## Feedback
+
+Feel free to send any feedback you may have regarding this project to NSinopoli@gmail.com.
+
+## Credits
+
+Special thanks to Matt Mueller (http://mattmueller.me/blog/), who came up with the initial concept, wrote the original code (https://github.com/MatthewMueller/PHPUnit-Test-Report), and was kind enough to share it.
+
+Thanks to Mike Zhou, Hang Dao, Thomas Ingham, and Fredrik Wollsén for their suggestions!
View
@@ -1,71 +0,0 @@
-VisualPHPUnit
-=============
-
-VisualPHPUnit is a visual front-end for PHPUnit. Written in PHP, it aims to make unit testing more appealing.
-
-Features
---------
-
-VisualPHPUnit provides the following features:
-
-* A stunning front-end which organizes test and suite results
-* The ability to view unit testing progress via graphs
-* An option to maintain a history of unit test results through the use of visual logs
-* Enumeration of PHPUnit statistics and messages
-* Convenient display of any debug messages written within unit tests
-* Sandboxing of PHP errors/exceptions
-
-Screenshots
------------
-
-.. image:: http://echodrop.net/code/vpu/ss7.png
-.. image:: http://echodrop.net/code/vpu/ss8.png
-
-Requirements
-------------
-
-VisualPHPUnit only supports PHPUnit v3.5 and above.
-
-Installation
-------------
-
-1. Download and extract the project to a web-accessible directory.
-2. Open config.php with your favorite editor.
- a. Change PEAR_PATH so that it points to the directory where PEAR is located.
- b. Update TEST_DIRECTORY so that it points to the root directory where your unit tests are stored.
-3. Point your browser to the location where you installed VisualPHPUnit!
-
-Configuration (optional)
-------------------------
-
-If you wish to set the default options for each test run, you can do so by modifying a few more lines in config.php.
-
-1. Change CREATE_SNAPSHOTS to *true* if you'd like to enable logging. Logs are stored in the 'history' directory, though you can modify SNAPSHOT_DIRECTORY to point somewhere else if you please. Please make note of the following:
- - You will have to give the directory specified in SNAPSHOT_DIRECTORY the appropriate permissions in order to allow PHP to write to it.
- - The dropdown list under the 'Archives' section on the homepage will only display the files found within SNAPSHOT_DIRECTORY.
-2. Change SANDBOX_ERRORS to *true* if you'd like VPU to display any PHP errors after the test results. If so, please make note of the following:
- - The file specified in SANDBOX_FILENAME will always be empty (VPU wipes it at the end of each test run). However, PHP still needs to be able to write to it, so ensure that the filename specified with SANDBOX_FILENAME has the appropriate permissions.
- - Specific error types can be ignored using the SANDBOX_IGNORE setting. Separate multiple error types with a '|' (e.g. 'E_STRICT|E_NOTICE').
-3. If you'd like to enable graph generation, you will have to do the following:
- - Change STORE_STATISTICS to *true*. If you'd like, you can keep this set as 'false', though you will have to change the 'Store Statistics' option to 'Yes' on the UI if you want the test statistics to be used in graph generation.
- - Run the migration 01_CREATE_SCHEMA (found in the 'migrations' directory) against a MySQL database. Note that this will automatically create a database named 'vpu' with the tables needed to save your test statistics.
- - Update each of the DATABASE_* constants to reflect your database settings. Note that if you're using the migration described above, DATABASE_NAME should remain set to 'vpu'.
-4. If your unit tests require any bootstraps, you can define them at the bottom of config.php in the appropriate '$bootstraps' array.
-
-
-Version Information
--------------------
-
-Current stable release is v1.5.5, last updated on 17 February 2012.
-
-Feedback
---------
-
-Feel free to send any feedback you may have regarding this project to NSinopoli@gmail.com.
-
-Credits
--------
-
-Special thanks to Matt Mueller (http://mattmueller.me/blog/), who came up with the initial concept, wrote the original code (https://github.com/MatthewMueller/PHPUnit-Test-Report), and was kind enough to share it.
-
-Thanks to Mike Zhou, Hang Dao, Thomas Ingham, and Fredrik Wollsén for their suggestions!
View
@@ -0,0 +1,35 @@
+<?php
+
+namespace app\config;
+
+class Routes {
+
+ public static function get_routes() {
+ return array(
+ array(array('get', 'post'), '/', function($request) {
+ $controller = new \app\controller\Home();
+ return $controller->call('index', $request);
+ }),
+
+ array(array('get', 'post'), '/graphs', function($request) {
+ $controller = new \app\controller\Graph();
+ return $controller->call('index', $request);
+ }),
+
+ array('get', '/file-list', function($request) {
+ $controller = new \app\controller\FileList();
+ return $controller->call('index', $request);
+ }),
+
+ // 404
+ array('get', '*', function($request) {
+ return array(
+ 'status' => 404,
+ 'body' => '<h1>Not Found</h1>'
+ );
+ })
+ );
+ }
+}
+
+?>
View
@@ -0,0 +1,33 @@
+<?php
+
+$config = array(
+ 'pear_path' => '/usr/share/pear',
+ 'db' => array(
+ 'plugin' => '\app\lib\PDO_MySQL',
+ 'database' => 'vpu',
+ 'host' => 'localhost',
+ 'port' => '3306',
+ 'username' => 'root',
+ 'password' => 'admin'
+ )
+);
+
+
+$root = PATH_SEPARATOR . dirname(dirname(__DIR__));
+set_include_path(
+ get_include_path()
+ . $root
+ . PATH_SEPARATOR . $config['pear_path']
+);
+
+require_once 'PHPUnit/Autoload.php';
+require_once 'PHPUnit/Util/Log/JSON.php';
+
+spl_autoload_register(function($class) {
+ $file = str_replace('\\', '/', $class) . '.php';
+ require $file;
+});
+
+\app\lib\Connections::add_db($config['db']);
+
+?>
@@ -0,0 +1,18 @@
+<?php
+
+namespace app\controller;
+
+class FileList extends \app\core\Controller {
+
+ // GET
+ public function index($request) {
+ if ( !$request->is('ajax') ) {
+ return $this->redirect('/');
+ }
+
+ return array();
+ }
+
+}
+
+?>
Oops, something went wrong.

0 comments on commit d4f835c

Please sign in to comment.