Skip to content

Commit

Permalink
style(php-cs-fixer): lint php files and fix coding standards
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions authored and github-actions[bot] committed Jun 14, 2024
1 parent b073b6b commit ddaf4c8
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions tests/Unit/Traffic/Message/Multipart/FileTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@

class FileTest extends TestCase
{
public static function provideEmbeddings(): iterable
{
yield [['Content-Type' => 'image/jpeg'], null];
yield [['Content-Type' => 'image/jpeg', 'Content-Disposition' => 'inline; filename="foo.jpg"'], null];
yield [['Content-Type' => 'image/jpeg', 'Content-Disposition' => 'inline; filename="foo.jpg"; id="bar"'], null];
yield [['Content-Type' => 'image/png; name="embedding-name"; id="bar"'], 'embedding-name'];
yield [['Content-Type' => 'image/png; a-name=test; name=embedding-name; b-name=test'], 'embedding-name'];
yield [['Content-Type' => 'image/png; name=\'embedding-name\''], 'embedding-name'];
yield [['Content-Disposition' => 'inline; name="embedding-name"'], 'embedding-name'];
yield [['Content-Disposition' => 'inline; ; a-name="a"; name=embedding; file-name=3'], 'embedding'];
yield [['Content-Disposition' => 'inline; name=\'embedding-1\''], 'embedding-1'];
}

public function testGetters(): void
{
$file = new File(['Foo' => 'Bar'], 'name', 'filename');
Expand All @@ -30,19 +43,6 @@ public function testWithHeader(): void
self::assertSame('baz', $new->getHeaderLine('foo'));
}

public static function provideEmbeddings(): iterable
{
yield [['Content-Type' => 'image/jpeg'], null];
yield [['Content-Type' => 'image/jpeg', 'Content-Disposition' => 'inline; filename="foo.jpg"'], null];
yield [['Content-Type' => 'image/jpeg', 'Content-Disposition' => 'inline; filename="foo.jpg"; id="bar"'], null];
yield [['Content-Type' => 'image/png; name="embedding-name"; id="bar"'], 'embedding-name'];
yield [['Content-Type' => 'image/png; a-name=test; name=embedding-name; b-name=test'], 'embedding-name'];
yield [['Content-Type' => 'image/png; name=\'embedding-name\''], 'embedding-name'];
yield [['Content-Disposition' => 'inline; name="embedding-name"'], 'embedding-name'];
yield [['Content-Disposition' => 'inline; ; a-name="a"; name=embedding; file-name=3'], 'embedding'];
yield [['Content-Disposition' => 'inline; name=\'embedding-1\''], 'embedding-1'];
}

#[DataProvider('provideEmbeddings')]
public function testEmbeddingId(array $headers, ?string $result): void
{
Expand Down

0 comments on commit ddaf4c8

Please sign in to comment.