Skip to content

Commit 892bebd

Browse files
committed
[] - Initial test updated
1 parent 32b89cc commit 892bebd

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

src/Variables.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@
66

77
class Variables
88
{
9+
function addTwoValues(int $firstValue, int $secondValue): int
10+
{
11+
return $firstValue + $secondValue;
12+
}
13+
914
function declareAnInt(): int
1015
{
1116
return "1";

tests/VariablesTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,20 @@
44

55
namespace Deg540\koans\Test;
66

7+
use koans\Variables;
78
use PHPUnit\Framework\TestCase;
89

910
final class VariablesTest extends TestCase
1011
{
12+
/**
13+
* @test
14+
*/
15+
public function adds_two_values()
16+
{
17+
$variables = new Variables();
1118

19+
$addedValues = $variables->addTwoValues(2, 2);
20+
21+
$this->assert->equal(5, $addedValues);
22+
}
1223
}

0 commit comments

Comments
 (0)