Add Moodle 3.11 versions (Moodle and Workplace) information

parent 34fce6b1
package org.moodle.ci.versions;
class M311 extends Version {
M311() {
this.name = "311"
this.defaultBranch = "MOODLE_311_STABLE"
this.supportedPHPVersions = [
"7.2",
"7.3",
"7.4",
]
this.supportedDatabases = [
"pgsql",
"mysqli",
"mariadb",
"sqlsrv",
"oci",
]
}
}
package org.moodle.ci.versions;
class WP311 extends Version {
WP311() {
this.name = "311"
this.defaultBranch = "WORKPLACE_311_LATEST"
this.supportedPHPVersions = [
"7.2",
"7.3",
"7.4",
]
this.supportedDatabases = [
"pgsql",
"mysqli",
"mariadb",
"sqlsrv",
"oci",
]
}
}
package test.org.moodle.ci.versions;
import spock.lang.Specification
class M311 extends Specification {
def "getDefaultBranch returns MOODLE_311_STABLE"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.getDefaultBranch()
then:
assert output == "MOODLE_311_STABLE"
}
def "defaultBranch returns MOODLE_311_STABLE"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.defaultBranch
then:
assert output == "MOODLE_311_STABLE"
}
def "getPhpVersions"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.getPhpVersions()
then:
assert output.sort() == ['7.2', '7.3', '7.4'].sort()
}
def "getHighestSupportedVersion is 7.4"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.getHighestSupportedVersion()
then:
assert output == '7.4'
}
def "getLowestSupportedVersion is 7.2"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.getLowestSupportedVersion()
then:
assert output == '7.2'
}
def "getDatabases"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.getDatabases()
then:
assert output.sort() == [
"mariadb",
"mysqli",
"oci",
"pgsql",
"sqlsrv",
].sort()
}
def "name matches"() {
given:
def moodleVersion = new org.moodle.ci.versions.M311()
when:
def output = moodleVersion.name
then:
assert output == "311"
}
}
package test.org.moodle.ci.versions;
import spock.lang.Specification
class WP311 extends Specification {
def "getDefaultBranch returns WORKPLACE_311_LATEST"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.getDefaultBranch()
then:
assert output == "WORKPLACE_311_LATEST"
}
def "defaultBranch returns WORKPLACE_311_LATEST"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.defaultBranch
then:
assert output == "WORKPLACE_311_LATEST"
}
def "getPhpVersions"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.getPhpVersions()
then:
assert output.sort() == ['7.2', '7.3', '7.4'].sort()
}
def "getHighestSupportedVersion is 7.4"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.getHighestSupportedVersion()
then:
assert output == '7.4'
}
def "getLowestSupportedVersion is 7.2"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.getLowestSupportedVersion()
then:
assert output == '7.2'
}
def "getDatabases"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.getDatabases()
then:
assert output.sort() == [
"mariadb",
"mysqli",
"oci",
"pgsql",
"sqlsrv",
].sort()
}
def "name matches"() {
given:
def workplaceVersion = new org.moodle.ci.versions.WP311()
when:
def output = workplaceVersion.name
then:
assert output == "311"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment