Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
with:
name: build-artifact-${{ matrix.php }}
path: /tmp/github-actions
retention-days: 1

phpunit:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -161,21 +162,3 @@ jobs:
php_version: ${{ matrix.php }}
path: src/
standard: phpcs.xml

remove_old_artifacts:
runs-on: ubuntu-latest

permissions:
actions: write

steps:
- name: Remove old artifacts for prior workflow runs on this repository
env:
GH_TOKEN: ${{ github.token }}
run: |
gh api "/repos/${{ github.repository }}/actions/artifacts" | jq ".artifacts[] | select(.name | startswith(\"build-artifact\")) | .id" > artifact-id-list.txt
while read id
do
echo -n "Deleting artifact ID $id ... "
gh api --method DELETE /repos/${{ github.repository }}/actions/artifacts/$id && echo "Done"
done <artifact-id-list.txt
19 changes: 19 additions & 0 deletions test/phpunit/ElementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -650,4 +650,23 @@ public function testConstruct_copyrightTrademark():void {
self::assertStringContainsString($copyright, $h1->innerHTML);
self::assertStringContainsString($trademark, $h1->innerHTML);
}

public function testValue_empty():void {
$document = new HTMLDocument("<!doctype html><input name='test' />");
$sut = $document->querySelector("input[name='test']");
self::assertEmpty($sut->value);
}

public function testValue_notEmptyFromHTML():void {
$document = new HTMLDocument("<!doctype html><input name='test' value='abcdef' />");
$sut = $document->querySelector("input[name='test']");
self::assertNotEmpty($sut->value);
}

public function testValue_notEmptyFromProperty():void {
$document = new HTMLDocument();
$sut = $document->createElement("input");
$sut->value = "abcdef";
self::assertNotEmpty($sut->value);
}
}
Loading