Skip to content

Commit 6476ede

Browse files
committed
Use better values in test codecs
1 parent b6db635 commit 6476ede

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

tests/Codec/CodecLibraryTest.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,18 @@ public function testDecode(): void
1616
{
1717
$codec = $this->getCodecLibrary();
1818

19-
$this->assertTrue($codec->canDecode('cigam'));
20-
$this->assertFalse($codec->canDecode('magic'));
19+
$this->assertTrue($codec->canDecode('encoded'));
20+
$this->assertFalse($codec->canDecode('decoded'));
2121

22-
$this->assertSame('magic', $codec->decode('cigam'));
22+
$this->assertSame('decoded', $codec->decode('encoded'));
2323
}
2424

2525
public function testDecodeIfSupported(): void
2626
{
2727
$codec = $this->getCodecLibrary();
2828

29-
$this->assertSame('magic', $codec->decodeIfSupported('cigam'));
30-
$this->assertSame('magic', $codec->decodeIfSupported('magic'));
29+
$this->assertSame('decoded', $codec->decodeIfSupported('encoded'));
30+
$this->assertSame('decoded', $codec->decodeIfSupported('decoded'));
3131
}
3232

3333
public function testDecodeNull(): void
@@ -54,18 +54,18 @@ public function testEncode(): void
5454
{
5555
$codec = $this->getCodecLibrary();
5656

57-
$this->assertTrue($codec->canEncode('magic'));
58-
$this->assertFalse($codec->canEncode('cigam'));
57+
$this->assertTrue($codec->canEncode('decoded'));
58+
$this->assertFalse($codec->canEncode('encoded'));
5959

60-
$this->assertSame('cigam', $codec->encode('magic'));
60+
$this->assertSame('encoded', $codec->encode('decoded'));
6161
}
6262

6363
public function testEncodeIfSupported(): void
6464
{
6565
$codec = $this->getCodecLibrary();
6666

67-
$this->assertSame('cigam', $codec->encodeIfSupported('magic'));
68-
$this->assertSame('cigam', $codec->encodeIfSupported('cigam'));
67+
$this->assertSame('encoded', $codec->encodeIfSupported('decoded'));
68+
$this->assertSame('encoded', $codec->encodeIfSupported('encoded'));
6969
}
7070

7171
public function testEncodeNull(): void
@@ -116,22 +116,22 @@ private function getCodecLibrary(): CodecLibrary
116116

117117
public function canDecode($value): bool
118118
{
119-
return $value === 'cigam';
119+
return $value === 'encoded';
120120
}
121121

122122
public function canEncode($value): bool
123123
{
124-
return $value === 'magic';
124+
return $value === 'decoded';
125125
}
126126

127127
public function decode($value)
128128
{
129-
return 'magic';
129+
return 'decoded';
130130
}
131131

132132
public function encode($value)
133133
{
134-
return 'cigam';
134+
return 'encoded';
135135
}
136136
}
137137
);

0 commit comments

Comments
 (0)