-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Hannes Giesenow
committed
Dec 20, 2023
1 parent
701cf18
commit 66404e9
Showing
19 changed files
with
185 additions
and
48 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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | ||
|
||
on: | ||
- pull_request | ||
- push | ||
|
||
jobs: | ||
php-cs-fixer: | ||
name: CS Fixer | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/elbformat/php-cs-fixer:edge-php8.2 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: check src | ||
run: php-cs-fixer fix --dry-run src | ||
- name: check tests | ||
run: php-cs-fixer fix --dry-run tests |
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,6 @@ | ||
/.idea | ||
vendor/ | ||
/build | ||
/vendor | ||
.phpunit.result.cache | ||
composer.lock | ||
docker-compose.override.yml |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="true" backupStaticAttributes="false" colors="false" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" forceCoversAnnotation="false" processIsolation="false" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false" stopOnRisky="false" verbose="false"> | ||
<coverage processUncoveredFiles="false"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="build/clover.xml"/> | ||
<html outputDirectory="build/coverage/html" lowUpperBound="35" highLowerBound="70"/> | ||
</report> | ||
</coverage> | ||
<testsuites> | ||
<testsuite name="unit"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<logging> | ||
<!-- <log type="coverage-php" target="/tmp/coverage.serialized"/>--> | ||
<!-- <log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>--> | ||
<junit outputFile="build/junit.xml"/> | ||
<!-- <log type="testdox-html" target="/tmp/testdox.html"/>--> | ||
<!-- <log type="testdox-text" target="/tmp/testdox.txt"/>--> | ||
</logging> | ||
</phpunit> |
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
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
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,24 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Elbformat\IconBundle\Test\FieldType\Icon; | ||
|
||
use Elbformat\IconBundle\FieldType\Icon\Value; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ValueTest extends TestCase | ||
{ | ||
public function testAccess(): void | ||
{ | ||
$value = new Value('icon1'); | ||
$this->assertSame('icon1', $value->getIcon()); | ||
$this->assertSame('icon1', (string) $value); | ||
$value->setIcon(null); | ||
$this->assertNull($value->getIcon()); | ||
$this->assertSame('', (string) $value); | ||
$value->setIcon('value2'); | ||
$this->assertSame('value2', $value->getIcon()); | ||
$this->assertSame('value2', (string) $value); | ||
} | ||
} |
Oops, something went wrong.