File tree Expand file tree Collapse file tree 3 files changed +7
-17
lines changed
Expand file tree Collapse file tree 3 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -151,18 +151,20 @@ private function requireUnitFile(string $file): ?Closure
151151 $ run = new Run ($ cli );
152152 $ run ->load ();
153153
154- ob_start ();
154+ // ob_start();
155155 if (!is_file ($ file )) {
156156 throw new RuntimeException ("File \"$ file \" do not exists. " );
157157 }
158158 require_once ($ file );
159159
160160 $ clone ->getUnit ()->execute ();
161161
162+ /*
162163 $outputBuffer = ob_get_clean();
163164 if (strlen($outputBuffer) && Unit::hasUnit()) {
164165 $clone->getUnit()->buildNotice("Note:", $outputBuffer, 80);
165166 }
167+ */
166168 };
167169 return $ call ->bindTo (null );
168170 }
Original file line number Diff line number Diff line change 11{
22 "name" : " maplephp/unitary" ,
33 "type" : " library" ,
4- "version" : " v1.1.1 " ,
5- "description" : " PHP Unitary is a lightweight PHP testing library designed to simplify the process of writing and running tests for your PHP code." ,
4+ "version" : " v1.1.2 " ,
5+ "description" : " PHP Unitary is a user-friendly and robust unit testing library designed to make writing and running tests for your PHP code easy ." ,
66 "keywords" : [
77 " php" ,
88 " cli" ,
Original file line number Diff line number Diff line change 1- #!/usr/bin/env php
21<?php
3- /**
4- * This is how a template test file should look like but
5- * when used in MaplePHP framework you can skip the "bash code" at top and the "autoload file"!
6- */
72use MaplePHP \Unitary \Unit ;
83
9- // If you add true to Unit it will run in quite mode
10- // and only report if it finds any errors!
11-
12- //throw new \Exception("Test error handler");
134$ unit = new Unit ();
145
15- $ unit ->manual ( " unitary " )-> add ("Unitary test " , function () {
6+ $ unit ->add ("Unitary test " , function () {
167
178 $ this ->add ("Lorem ipsum dolor " , [
18- "isInt " => [],
9+ "isString " => [],
1910 "length " => [1 ,200 ]
2011
2112 ])->add (92928 , [
2819 }
2920 ], "The length is not correct! " );
3021
31-
3222});
33-
34- $ unit ->execute ();
You can’t perform that action at this time.
0 commit comments