generated from chicory/package-template
Compare commits
No commits in common. "feature/doctrine-collection-interface-implementation" and "main" have entirely different histories.
feature/do
...
main
|
@ -2,6 +2,7 @@ name: Run code tests
|
|||
run-name: Run code tests
|
||||
on:
|
||||
push:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
Run-code-test:
|
13
src/ExampleClass.php
Normal file
13
src/ExampleClass.php
Normal file
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chicory\PackageTemplate;
|
||||
|
||||
class ExampleClass
|
||||
{
|
||||
public function sayHello(): string
|
||||
{
|
||||
return 'Hello';
|
||||
}
|
||||
}
|
27
tests/ExampleClassTest.php
Normal file
27
tests/ExampleClassTest.php
Normal file
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chicory\Tests\PackageTemplate;
|
||||
|
||||
use Chicory\PackageTemplate\ExampleClass;
|
||||
use PHPUnit\Framework\Attributes\CoversClass;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
#[CoversClass(ExampleClass::class)]
|
||||
class ExampleClassTest extends TestCase
|
||||
{
|
||||
public ExampleClass $exampleClass;
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
$this->exampleClass = new ExampleClass();
|
||||
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
public function testExampleClass(): void
|
||||
{
|
||||
$this->assertEquals('Hello', $this->exampleClass->sayHello());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user