File tree Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Expand file tree Collapse file tree 3 files changed +42
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace DataLinx \PhpPackageTemplate ;
4+
5+ class Math
6+ {
7+ public static function add ($ a , $ b )
8+ {
9+ return $ a + $ b ;
10+ }
11+
12+ public static function subtract ($ a , $ b )
13+ {
14+ return $ a - $ b ;
15+ }
16+
17+ public static function multiply ($ a , $ b )
18+ {
19+ return $ a * $ b ;
20+ }
21+
22+ }
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ test ('example ' , function () {
4+ expect (true )->toBeTrue ();
5+ });
Original file line number Diff line number Diff line change 1+ <?php
2+
3+ use DataLinx \PhpPackageTemplate \Math ;
4+
5+ test ('it adds two numbers ' , function () {
6+ expect (Math::add (1 , 2 ))->toBe (3 );
7+ });
8+
9+ test ('it subtracts two numbers ' , function () {
10+ expect (Math::subtract (2 , 1 ))->toBe (1 );
11+ });
12+
13+ test ('it multiplies two numbers ' , function () {
14+ expect (Math::multiply (2 , 2 ))->toBe (4 );
15+ });
You can’t perform that action at this time.
0 commit comments