mirror of
https://github.com/10h30/wp-strava.git
synced 2026-07-11 18:56:18 +09:00
Added check for empty activity time
This commit is contained in:
@@ -96,6 +96,18 @@ class WPStrava_SOMEnglishTest extends TestCase {
|
||||
$this->assertEquals( '61:24:31', $this->som->time( 221071 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that null or empty seconds input will return an empty string (not an exception).
|
||||
*
|
||||
* @author Justin Foell <justin@foell.org>
|
||||
* @since 2.9.1
|
||||
*/
|
||||
public function test_time_empty() {
|
||||
$this->assertEquals( '', $this->som->time( '' ) );
|
||||
$this->assertEquals( '', $this->som->time( null ) );
|
||||
$this->assertEquals( '', $this->som->time( 0 ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Test that 1304 calories is 1,304 using both string and int inputs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user