-
-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Complete the unit testing and add some features #93
Conversation
Current coverage is 97.82% (diff: 100%)
|
Hi @cmfcmf , I fix the icoUrl variable error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @peter279k,
thank you for your contributions! I've gone through most of your changes now and only found a few minor issues which I have already fixed myself. Expect your changes to be merged soon!
@@ -75,6 +75,9 @@ public function __construct($weatherHistory, $query) | |||
|
|||
$utctz = new \DateTimeZone('UTC'); | |||
foreach ($weatherHistory['list'] as $history) { | |||
if (isset($history['city'])) { | |||
continue; | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been merged as part of #96. Thank you @peter279k! |
First of all, thank you for your great package. Let me access OpenWeatherMap API with PHP easily.
Change log
Complete the unit testing.
Ignore testing the
getWeatherHistory
method inOpenWeatherMap.php
.This method is ignored because the api key need to have a paid permission.
Integrate the
integTests
withtests
.Replace
sprintf
function withstr_replace
inWeather.php
because the character%s
is proper for using thesprintf
.Replace
json_last_error_msg
withjson_last_error
inOpenWeatherMap.php
. Because thejson_last_error_msg
is available for PHP 5.5+ (see this link). In order to be compatible with older PHP version (like 5.3 or 5.4), so we do this.In
ExampleCache.php
, addingsetTempPath
method allow us to specify the cached file path.Using the
#
to comment message is deprecated in*.ini
file. Replace the#
with this;
.Set the proper configuration in
phpunit.xml.dist
file.Add the required extension:
ext-curl
in composer.json.It will check whether the
curl
extension is installed during running theComposer
installation.Add the
require-dev
key incomposer.json
.the travis-ci result
the testing code coverage report (provided by
codecov
)