From df54bf272dc15615d013b807ed47baaa84ee7fac Mon Sep 17 00:00:00 2001 From: Mikel Romano Date: Wed, 10 Feb 2021 11:45:43 +0100 Subject: [PATCH] [] - Koans Variables exercises implemented --- .gitignore | 0 README.md | 0 composer.json | 0 composer.lock | 0 composer.phar | 0 phpunit.xml | 0 src/Example.php | 0 src/Variable.php | 53 +++++++++++++++++++++++++++++++++ tests/ExampleTest.php | 8 ++++- tests/VariableTest.php | 67 ++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 127 insertions(+), 1 deletion(-) mode change 100644 => 100755 .gitignore mode change 100644 => 100755 README.md mode change 100644 => 100755 composer.json mode change 100644 => 100755 composer.lock mode change 100644 => 100755 composer.phar mode change 100644 => 100755 phpunit.xml mode change 100644 => 100755 src/Example.php create mode 100644 src/Variable.php mode change 100644 => 100755 tests/ExampleTest.php create mode 100644 tests/VariableTest.php diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 diff --git a/composer.lock b/composer.lock old mode 100644 new mode 100755 diff --git a/composer.phar b/composer.phar old mode 100644 new mode 100755 diff --git a/phpunit.xml b/phpunit.xml old mode 100644 new mode 100755 diff --git a/src/Example.php b/src/Example.php old mode 100644 new mode 100755 diff --git a/src/Variable.php b/src/Variable.php new file mode 100644 index 0000000..cc32668 --- /dev/null +++ b/src/Variable.php @@ -0,0 +1,53 @@ +assertFalse(true); + $this->assertIsInt('2'); + } } diff --git a/tests/VariableTest.php b/tests/VariableTest.php new file mode 100644 index 0000000..4220b3c --- /dev/null +++ b/tests/VariableTest.php @@ -0,0 +1,67 @@ +declareAnInt(); + + $this->assertIsInt($integerValue); + } + + /** + * @test + **/ + public function declareABoolean() + { + $variable = new Variable(); + $booleanValue = $variable->declareABoolean(); + + $this->assertIsBool($booleanValue); + } + + /** + * @test + **/ + public function declareAFloat() + { + $variable = new Variable(); + $floatValue = $variable->declareAFloat(); + + $this->assertIsFloat($floatValue); + } + + /** + * @test + **/ + public function declareAnArray() + { + $variable = new Variable(); + $arrayValue = $variable->declareAnArray(); + + $this->assertIsArray($arrayValue); + } + + /** + * @test + **/ + public function declareAnIntWithNullValue() + { + $variable = new Variable(); + $intValue = $variable->declareAnIntWithNullValue(); + + $this->assertIsInt($intValue); + $this->assertEquals(null, $intValue); + } + + +}