mirror of
https://github.com/nicoverbruggen/phpmon.git
synced 2025-08-07 20:10:08 +02:00
✅ Improved test
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
// PhpVersionDetectionTest.swift
|
// PhpVersionDetectionTest.swift
|
||||||
// phpmon-tests
|
// phpmon-tests
|
||||||
//
|
//
|
||||||
// Created by Nico Verbruggen on 14/02/2021.
|
// Created by Nico Verbruggen on 01/04/2021.
|
||||||
// Copyright © 2021 Nico Verbruggen. All rights reserved.
|
// Copyright © 2021 Nico Verbruggen. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
@ -10,7 +10,7 @@ import XCTest
|
|||||||
|
|
||||||
class PhpVersionDetectionTest: XCTestCase {
|
class PhpVersionDetectionTest: XCTestCase {
|
||||||
|
|
||||||
func testCanExtractData() throws {
|
func testCanDetectValidPhpVersions() throws {
|
||||||
let outcome = Actions.extractPhpVersions(from: [
|
let outcome = Actions.extractPhpVersions(from: [
|
||||||
"", // empty lines should be omitted
|
"", // empty lines should be omitted
|
||||||
"php@8.0",
|
"php@8.0",
|
||||||
@ -18,6 +18,8 @@ class PhpVersionDetectionTest: XCTestCase {
|
|||||||
"meta-php@8.0", // should be omitted, invalid
|
"meta-php@8.0", // should be omitted, invalid
|
||||||
"php@8.0-coolio", // should be omitted, invalid
|
"php@8.0-coolio", // should be omitted, invalid
|
||||||
"php@7.0",
|
"php@7.0",
|
||||||
|
"",
|
||||||
|
"unrelatedphp@1.0", // should be omitted, invalid
|
||||||
"php@5.6",
|
"php@5.6",
|
||||||
"php@5.4" // should be omitted, not supported
|
"php@5.4" // should be omitted, not supported
|
||||||
], checkBinaries: false)
|
], checkBinaries: false)
|
||||||
|
Reference in New Issue
Block a user