Skip to content

Commit aec01ee

Browse files
committed
Rename to User semantics
1 parent eba61b5 commit aec01ee

File tree

7 files changed

+49
-83
lines changed

7 files changed

+49
-83
lines changed
Binary file not shown.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../examples/java/java-student_grades-01_base_example

examples/php/php-user_modelling-01_base/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@
3838
},
3939
"autoload": {
4040
"psr-4": {
41-
"CodelyTv\\PhpBootstrap\\": "src/"
41+
"CodelyTv\\UserModelling\\": "src/"
4242
}
4343
},
4444
"autoload-dev": {
4545
"psr-4": {
46-
"CodelyTv\\PhpBootstrapTest\\": "tests/"
46+
"CodelyTv\\UserModelling\\Test\\": "tests/"
4747
}
4848
},
4949
"minimum-stability": "stable",

examples/php/php-user_modelling-01_base/phpunit.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@
33
colors="true"
44
beStrictAboutTestsThatDoNotTestAnything="true"
55
beStrictAboutOutputDuringTests="true"
6-
beStrictAboutTestSize="true"
76
beStrictAboutChangesToGlobalState="true">
87
<testsuites>
9-
<testsuite name="phpBootstrap">
8+
<testsuite name="UserModelling">
109
<directory>tests</directory>
1110
</testsuite>
1211
</testsuites>

examples/php/php-user_modelling-01_base/src/Codelyber.php

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace CodelyTv\UserModelling;
6+
7+
final class User
8+
{
9+
private string $locale;
10+
private int $age;
11+
12+
public function __construct(string $locale, int $age)
13+
{
14+
$this->locale = $locale;
15+
$this->age = $age;
16+
}
17+
18+
public function locale(): string
19+
{
20+
return $this->locale;
21+
}
22+
23+
public function age(): int
24+
{
25+
return $this->age;
26+
}
27+
}

examples/php/php-user_modelling-01_base/tests/CodelyberTest.php

Lines changed: 0 additions & 50 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
3+
declare(strict_types = 1);
4+
5+
namespace CodelyTv\UserModelling\Test;
6+
7+
use CodelyTv\UserModelling\User;
8+
use PHPUnit\Framework\TestCase;
9+
10+
final class UserTest extends TestCase
11+
{
12+
/** @test */
13+
public function shouldSayHelloWhenGreeting()
14+
{
15+
$user = new User("es_ES", 20);
16+
17+
self::assertEquals("es_ES", $user->locale());
18+
}
19+
}

0 commit comments

Comments
 (0)