Skip to content

Commit 77b9a4b

Browse files
committed
Added some files
Signed-off-by: Eric Richer [email protected] <[email protected]>
1 parent 3a53a0a commit 77b9a4b

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "lm-commons/repository-template",
3-
"description": "Repository template",
2+
"name": "lm-commons/automation-testing",
3+
"description": "Repository for testing automation",
44
"license": "MIT",
55
"authors": [
66
{
@@ -18,10 +18,14 @@
1818
"vimeo/psalm": "^5.25"
1919
},
2020
"autoload": {
21-
21+
"psr-4": {
22+
"Automation\\": "src/"
23+
}
2224
},
2325
"autoload-dev": {
24-
26+
"psr-4": {
27+
"AutomationTest\\": "test/"
28+
}
2529
},
2630
"config": {
2731
"allow-plugins": {

src/Auto.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Automation;
6+
7+
class Auto
8+
{
9+
protected string $name;
10+
11+
public function __construct(string $name)
12+
{
13+
$this->name = $name;
14+
}
15+
16+
public function getName(): string
17+
{
18+
return $this->name;
19+
}
20+
21+
public function setName(string $name): void
22+
{
23+
$this->name = $name;
24+
}
25+
}

test/AutoTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace AutomationTest;
6+
7+
use Automation\Auto;
8+
use PHPUnit\Framework\TestCase;
9+
10+
class AutoTest extends TestCase
11+
{
12+
public function testConstructor(): void
13+
{
14+
$auto = new Auto('foo');
15+
$this->assertEquals('foo', $auto->getName());
16+
}
17+
}

0 commit comments

Comments
 (0)