Skip to content

Commit 45849ed

Browse files
committed
[] - Initial test updated
1 parent 32b89cc commit 45849ed

2 files changed

Lines changed: 17 additions & 1 deletion

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: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,22 @@
22

33
declare(strict_types=1);
44

5-
namespace Deg540\koans\Test;
5+
namespace 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->assertEquals(5, $addedValues);
22+
}
1223
}

0 commit comments

Comments
 (0)