-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4082dee
commit 75850a1
Showing
15 changed files
with
90 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
cd "$(dirname "$0")" | ||
|
||
docker exec --workdir /www -it gender-api-client /usr/bin/composer "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# ./docker-compose.yml | ||
|
||
version: '3.7' | ||
|
||
services: | ||
php: | ||
image: phpdockerio/php:8.1-fpm | ||
container_name: gender-api-client | ||
volumes: | ||
- ./.:/www | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,18 +21,17 @@ public function testGetByEmailAddressWithoutCountry() | |
$genderApiClient = $this->getClient(); | ||
|
||
if ($this->doMock) { | ||
/* @var FileGetContents|\PHPUnit_Framework_MockObject_MockObject $downloader */ | ||
$downloader = $this->createMock(FileGetContents::class); | ||
$downloader->method('download') | ||
->willReturn('{"email":"[email protected]","lastname":null,"mailprovider":"gmail","name":"elisabeth","gender":"female","samples":17296,"accuracy":98,"duration":"20ms"}'); | ||
->willReturn('{"email":"[email protected]","lastname":null,"mailprovider":"gmail","name":"elisabeth","gender":"female","samples":17296,"accuracy":99,"duration":"20ms"}'); | ||
$genderApiClient->setDownloader($downloader); | ||
} | ||
|
||
$result = $genderApiClient->getByEmailAddress('[email protected]'); | ||
|
||
$this->assertEquals('elisabeth', $result->getName()); | ||
$this->assertEquals('female', $result->getGender()); | ||
$this->assertEquals(98, $result->getAccuracy()); | ||
$this->assertEquals(99, $result->getAccuracy()); | ||
$this->assertEquals('[email protected]', $result->getEmailAddress()); | ||
$this->assertEquals(null, $result->getLastName()); | ||
$this->assertEquals('gmail', $result->getMailProvider()); | ||
|
Oops, something went wrong.