-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SS5 upgrades, switch to Github Actions
- Loading branch information
Showing
14 changed files
with
102 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/.github export-ignore | ||
/tests export-ignore | ||
/.travis.yml export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/phpunit.xml export-ignore | ||
/phpcs.xml export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Dispatch CI | ||
|
||
on: | ||
# At 12:10 PM UTC, only on Sunday and Monday | ||
schedule: | ||
- cron: '10 12 * * 0,1' | ||
|
||
jobs: | ||
dispatch-ci: | ||
name: Dispatch CI | ||
# Only run cron on the burnbright account | ||
if: (github.event_name == 'schedule' && github.repository_owner == 'burnbright') || (github.event_name != 'schedule') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dispatch CI | ||
uses: silverstripe/gha-dispatch-ci@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Keepalive | ||
|
||
on: | ||
workflow_dispatch: | ||
# The 7th of every month at 12:50pm UTC | ||
schedule: | ||
- cron: '50 12 7 * *' | ||
|
||
jobs: | ||
keepalive: | ||
name: Keepalive | ||
# Only run cron on the burnbright account | ||
if: (github.event_name == 'schedule' && github.repository_owner == 'burnbright') || (github.event_name != 'schedule') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Keepalive | ||
uses: silverstripe/gha-keepalive@v1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ruleset name="SilverStripe"> | ||
<description>CodeSniffer ruleset for SilverStripe coding conventions.</description> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
|
||
<!-- base rules are PSR-2 --> | ||
<rule ref="PSR2" > | ||
<!-- Current exclusions --> | ||
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" /> | ||
<exclude name="Squiz.Classes.ValidClassName.NotCamelCaps" /> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,28 @@ public function testDomain() | |
$this->assertEquals("www.hostname.com", $f->Domain()); | ||
} | ||
|
||
public function testNoWWW() | ||
{ | ||
$f = new ExternalURL("MyField"); | ||
$f->setValue("http://username:[email protected]:81/path?arg=value#anchor"); | ||
$this->assertEquals("http://username:[email protected]:81/path?arg=value#anchor", $f->NoWWW()); | ||
$f->setValue("http://www.wwwhostname.com:81/path?arg=value#anchor"); | ||
$this->assertEquals("http://wwwhostname.com:81/path?arg=value#anchor", $f->NoWWW()); | ||
} | ||
|
||
public function testLeaveURLAsIs() | ||
{ | ||
$f = new ExternalURL("MyField"); | ||
$f->setValue("http://username:[email protected]:81/path?arg=value#anchor"); | ||
$this->assertEquals("http://username:[email protected]:81/path?arg=value#anchor", $f->URL()); | ||
$f->setValue("https://www.hostname.com/test/path/"); | ||
$this->assertEquals("https://www.hostname.com/test/path/", $f->URL()); | ||
$f->setValue("https://www.hostname.com/test/path"); | ||
$this->assertEquals("https://www.hostname.com/test/path", $f->URL()); | ||
$f->setValue("https://www.hostname.com/test/path/?arg=value"); | ||
$this->assertEquals("https://www.hostname.com/test/path/?arg=value", $f->URL()); | ||
} | ||
|
||
public function testScaffolding() | ||
{ | ||
$f = new ExternalURL("MyField"); | ||
|