We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e22c0bf commit 0a78010Copy full SHA for 0a78010
tests/Unit/Complex/FullNameTest.php
@@ -62,9 +62,16 @@
62
FullName::macro('surname', function () {
63
return $this->split[1];
64
});
65
-
66
$valueObject = new FullName('Anna Ewa Kowalska');
+ $this->assertSame('Ewa', $valueObject->surname());
67
68
+ FullName::macro('inverse', function () {
69
+ return $this->split = $this->split->reverse();
70
+ });
71
+ $valueObject = new FullName('Nowak-Kowalska Ewa Anna');
72
+ $valueObject->inverse();
73
+ $this->assertSame('Anna', $valueObject->firstName());
74
+ $this->assertSame('Nowak-Kowalska', $valueObject->lastName());
75
$this->assertSame('Ewa', $valueObject->surname());
76
77
0 commit comments