Skip to content

Commit 1d001fd

Browse files
authored
Merge pull request #22 from Thavarshan/fix/self-update-test-version-fixtures
test: update self-update version fixtures to 1.12.2
2 parents cd81d63 + ff0c8c2 commit 1d001fd

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/01_core.bats

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,27 @@ load test_helper
2222
local remote_file="$TEST_DIR/phpvm-latest.sh"
2323
cat > "$remote_file" <<'EOF'
2424
#!/bin/bash
25-
PHPVM_VERSION="1.12.1"
25+
PHPVM_VERSION="1.12.2"
2626
EOF
2727

2828
run env PHPVM_TEST_MODE=true PHPVM_SELF_UPDATE_TEST_SOURCE="$remote_file" PHPVM_SELF_UPDATE_DEST="$TEST_DIR/phpvm-self-update-target.sh" bash "$BATS_TEST_DIRNAME/../phpvm.sh" self-update
2929
[ "$status" -eq 0 ]
30-
[[ "$output" =~ "You are already on the latest version: v1.12.1." ]]
30+
[[ "$output" =~ "You are already on the latest version: v1.12.2." ]]
3131
}
3232

3333
@test "phpvm self-update replaces script when newer version is available" {
3434
local remote_file="$TEST_DIR/phpvm-updated.sh"
3535
local target_file="$TEST_DIR/phpvm-self-update-target.sh"
3636
cat > "$remote_file" <<'EOF'
3737
#!/bin/bash
38-
PHPVM_VERSION="1.12.2"
38+
PHPVM_VERSION="1.12.3"
3939
EOF
4040
touch "$target_file"
4141

4242
run env PHPVM_TEST_MODE=true PHPVM_SELF_UPDATE_TEST_SOURCE="$remote_file" PHPVM_SELF_UPDATE_DEST="$target_file" bash "$BATS_TEST_DIRNAME/../phpvm.sh" self-update
4343
[ "$status" -eq 0 ]
44-
[[ "$output" =~ "phpvm successfully updated to the latest version: v1.12.2." ]]
45-
[ "$(grep -oE 'PHPVM_VERSION="[0-9]+\.[0-9]+\.[0-9]+"' "$target_file")" = "PHPVM_VERSION=\"1.12.2\"" ]
44+
[[ "$output" =~ "phpvm successfully updated to the latest version: v1.12.3." ]]
45+
[ "$(grep -oE 'PHPVM_VERSION="[0-9]+\.[0-9]+\.[0-9]+"' "$target_file")" = "PHPVM_VERSION=\"1.12.3\"" ]
4646
}
4747

4848
@test "phpvm self-update downloads from remote URL and updates script" {

0 commit comments

Comments
 (0)