Skip to content

Commit

Permalink
Merge pull request #1 from visto9259/master
Browse files Browse the repository at this point in the history
Adding some files for testing
  • Loading branch information
visto9259 authored Sep 24, 2024
2 parents 3a53a0a + f851b74 commit 0cfc889
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 4 deletions.
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lm-commons/repository-template",
"description": "Repository template",
"name": "lm-commons/automation-testing",
"description": "Repository for testing automation",
"license": "MIT",
"authors": [
{
Expand All @@ -18,10 +18,14 @@
"vimeo/psalm": "^5.25"
},
"autoload": {

"psr-4": {
"Automation\\": "src/"
}
},
"autoload-dev": {

"psr-4": {
"AutomationTest\\": "test/"
}
},
"config": {
"allow-plugins": {
Expand Down
25 changes: 25 additions & 0 deletions src/Auto.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

namespace Automation;

class Auto
{
protected string $name;

public function __construct(string $name)
{
$this->name = $name;
}

public function getName(): string
{
return $this->name;
}

public function setName(string $name): void
{
$this->name = $name;
}
}
24 changes: 24 additions & 0 deletions test/AutoTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

namespace AutomationTest;

use Automation\Auto;
use PHPUnit\Framework\TestCase;

class AutoTest extends TestCase
{
public function testConstructor(): void
{
$auto = new Auto('foo');
$this->assertEquals('foo', $auto->getName());
}

public function testSetName(): void
{
$auto = new Auto('foo');
$auto->setName('bar');
$this->assertEquals('bar', $auto->getName());
}
}

0 comments on commit 0cfc889

Please sign in to comment.