Skip to content

Commit

Permalink
Merge 794d547 into c5a65b7
Browse files Browse the repository at this point in the history
  • Loading branch information
ozh committed Oct 2, 2019
2 parents c5a65b7 + 794d547 commit a52c834
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/tests/utilities/next_decimal.php
Expand Up @@ -18,20 +18,22 @@ public function test_get_next_decimal() {
/**
* @depends test_get_next_decimal
*/
public function test_update_next_decimal($id) {
// with no arg
public function test_update_next_decimal_no_arg($id) {
$update = yourls_update_next_decimal();
$this->assertTrue($update);
$next = yourls_get_next_decimal();
$this->assertSame($next, $id + 1);
}

// with arg
$rand = mt_rand(150,200);
/**
* @depends test_get_next_decimal
*/
public function test_update_next_decimal_with_arg($id) {
$rand = mt_rand(1500,2000);
$update = yourls_update_next_decimal($rand);
$this->assertTrue($update);
$next = yourls_get_next_decimal();
$this->assertSame($next, $rand);

}

}

0 comments on commit a52c834

Please sign in to comment.