Last active
January 7, 2023 12:31
-
-
Save mihaichris/02bb95cc3f5fc11a6139163a4f2610a8 to your computer and use it in GitHub Desktop.
Pest Unit Test
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 | |
namespace GoodDay; | |
use Greetings\HelloWordService; | |
beforeEach(function () { | |
$this->helloService = new HelloWordService(); | |
}); | |
it('should say Hello World!', function () { | |
$this->assertSame('Hello World!', $this->helloService->sayHelloWorld()); | |
})->group('greetings'); | |
test('greet friends', function (string $name) { | |
$this->assertSame("Hello $name!", $this->helloService->sayHelloTo($name)); | |
})->with(['Ana', 'John', 'Marius'])->group('greetings'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment