We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 32b89cc commit 892bebdCopy full SHA for 892bebd
2 files changed
src/Variables.php
@@ -6,6 +6,11 @@
6
7
class Variables
8
{
9
+ function addTwoValues(int $firstValue, int $secondValue): int
10
+ {
11
+ return $firstValue + $secondValue;
12
+ }
13
+
14
function declareAnInt(): int
15
16
return "1";
tests/VariablesTest.php
@@ -4,9 +4,20 @@
4
5
namespace Deg540\koans\Test;
+use koans\Variables;
use PHPUnit\Framework\TestCase;
final class VariablesTest extends TestCase
+ /**
+ * @test
+ */
+ public function adds_two_values()
17
+ $variables = new Variables();
18
19
+ $addedValues = $variables->addTwoValues(2, 2);
20
21
+ $this->assert->equal(5, $addedValues);
22
23
}
0 commit comments