File tree Expand file tree Collapse file tree 2 files changed +19
-3
lines changed
src/DocScan/Session/Retrieve/Configuration/Capture/Document
tests/DocScan/Session/Retrieve/Configuration/Capture/Document Expand file tree Collapse file tree 2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,17 @@ class SupportedDocumentResponse
10
10
private $ type ;
11
11
12
12
/**
13
- * @param array<string, string> $supportedDocument
13
+ * @var bool|null
14
+ */
15
+ private $ isStrictlyLatin ;
16
+
17
+ /**
18
+ * @param array<string, mixed> $supportedDocument
14
19
*/
15
20
public function __construct (array $ supportedDocument )
16
21
{
17
22
$ this ->type = $ supportedDocument ['type ' ] ?? null ;
23
+ $ this ->isStrictlyLatin = $ supportedDocument ['is_strictly_latin ' ] ?? null ;
18
24
}
19
25
20
26
/**
@@ -26,4 +32,12 @@ public function getType(): ?string
26
32
{
27
33
return $ this ->type ;
28
34
}
35
+
36
+ /**
37
+ * @return bool|null
38
+ */
39
+ public function isStrictlyLatin (): ?bool
40
+ {
41
+ return $ this ->isStrictlyLatin ;
42
+ }
29
43
}
Original file line number Diff line number Diff line change @@ -16,12 +16,14 @@ class SupportedDocumentResponseTest extends TestCase
16
16
* @test
17
17
* @covers ::__construct
18
18
* @covers ::getType
19
+ * @covers ::isStrictlyLatin
19
20
*/
20
- public function shouldBuildCorrectly ()
21
+ public function shouldBuildCorrectly (): void
21
22
{
22
- $ result = new SupportedDocumentResponse (['type ' => self ::SOME_TYPE ]);
23
+ $ result = new SupportedDocumentResponse (['type ' => self ::SOME_TYPE , ' is_strictly_latin ' => true ]);
23
24
24
25
$ this ->assertEquals (self ::SOME_TYPE , $ result ->getType ());
25
26
$ this ->assertInstanceOf (SupportedDocumentResponse::class, $ result );
27
+ $ this ->assertTrue ($ result ->isStrictlyLatin ());
26
28
}
27
29
}
You can’t perform that action at this time.
0 commit comments