Skip to content
Permalink
Browse files

Split test in 2 (#2558)

This test randomly fails on Travis. Now split in 2 to see which parts is inconsistent. Still randomly fails on both tests now.
  • Loading branch information...
ozh committed Oct 2, 2019
1 parent c5a65b7 commit ba624eb8ee7efac45a1c2ed50c3a4be984901c68
Showing with 7 additions and 5 deletions.
  1. +7 −5 tests/tests/utilities/next_decimal.php
@@ -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 ba624eb

Please sign in to comment.
You can’t perform that action at this time.