File tree Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Expand file tree Collapse file tree 4 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 2
2
.idea
3
3
node_modules
4
4
* .o
5
+ vendor
Original file line number Diff line number Diff line change
1
+ {
2
+ "require" : {
3
+ "phpunit/phpunit" : " 5.5.*"
4
+ }
5
+ }
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <testsuites >
3
+ <testsuite name =" code-problom test suites" >
4
+ <directory suffix =" Test.php" >tests/php</directory >
5
+ </testsuite >
6
+ </testsuites >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ use PHPUnit \Framework \TestCase ;
3
+
4
+ require_once 'solutions/php/factorial.php ' ;
5
+
6
+ class StackTest extends TestCase
7
+ {
8
+ public function test_factorial ()
9
+ {
10
+ $ this ->assertEquals (1 ,factorial (1 ) );
11
+ $ this ->assertEquals (2 ,factorial (2 ) );
12
+ $ this ->assertEquals (6 ,factorial (3 ) );
13
+ $ this ->assertEquals (120 ,factorial (5 ) );
14
+ $ this ->assertEquals (2432902008176640000 ,factorial (20 ) );
15
+ }
16
+ }
17
+ ?>
You can’t perform that action at this time.
0 commit comments