Last active
July 15, 2019 20:42
-
-
Save flesheater/a380e54ccdcba45dd09bc59f840efb08 to your computer and use it in GitHub Desktop.
DrupalUnitTest
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
#tests/src/Unit/FibonacciServiceTest.php | |
namespace Drupal\Tests\drupalup_fibo\Unit; | |
use Drupal\Tests\UnitTestCase; | |
use Drupal\drupalup_fibo\FibonacciService; | |
/** | |
* Our unit test for the fibonacci service. | |
*/ | |
class FibonacciServiceTest extends UnitTestCase { | |
/** | |
* | |
*/ | |
public function testFifthFibonacciNumber() { | |
$fibonacciService = new FibonacciService(); | |
$fiboSequence = $fibonacciService->calcSomeFibos(6); | |
$this->assertEquals( | |
$fiboSequence[4], | |
3 | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment