Skip to content

Commit 36aa2db

Browse files
committed
Test missing coverage
1 parent f1e69ba commit 36aa2db

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

tests/OptionsArrayTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Arokettu\Bencode\Tests;
6+
7+
use Arokettu\Bencode\Bencode;
8+
use PHPUnit\Framework\TestCase;
9+
10+
class OptionsArrayTest extends TestCase
11+
{
12+
public function testDecoder(): void
13+
{
14+
$this->expectException(\InvalidArgumentException::class);
15+
$this->expectExceptionMessage('$options array must not be used');
16+
17+
Bencode::decode('de', ['any' => 'thing']);
18+
}
19+
20+
public function testEncoder(): void
21+
{
22+
$this->expectException(\InvalidArgumentException::class);
23+
$this->expectExceptionMessage('$options array must not be used');
24+
25+
Bencode::encode([], ['any' => 'thing']);
26+
}
27+
}

0 commit comments

Comments
 (0)