@@ -31,6 +31,9 @@ public static function setUpBeforeClass(): void
31
31
require_once 'NucleotideCount.php ' ;
32
32
}
33
33
34
+ /**
35
+ * uuid: 3e5c30a8-87e2-4845-a815-a49671ade970
36
+ */
34
37
public function testEmptyDNASequence (): void
35
38
{
36
39
$ this ->assertSame ([
@@ -41,17 +44,36 @@ public function testEmptyDNASequence(): void
41
44
], nucleotideCount ('' ));
42
45
}
43
46
47
+ /**
48
+ * uuid: a0ea42a6-06d9-4ac6-828c-7ccaccf98fec
49
+ */
50
+ public function testDNASequenceSingleNucleotide (): void
51
+ {
52
+ $ this ->assertSame ([
53
+ 'a ' => 0 ,
54
+ 'c ' => 0 ,
55
+ 't ' => 0 ,
56
+ 'g ' => 1 ,
57
+ ], nucleotideCount ('G ' ));
58
+ }
59
+
60
+ /**
61
+ * uuid: eca0d565-ed8c-43e7-9033-6cefbf5115b5
62
+ */
44
63
public function testRepetitiveDNASequence (): void
45
64
{
46
65
$ this ->assertSame ([
47
- 'a ' => 9 ,
66
+ 'a ' => 0 ,
48
67
'c ' => 0 ,
49
68
't ' => 0 ,
50
- 'g ' => 0 ,
51
- ], nucleotideCount ('AAAAAAAAA ' ));
69
+ 'g ' => 7 ,
70
+ ], nucleotideCount ('GGGGGGG ' ));
52
71
}
53
72
54
- public function testDNASequence (): void
73
+ /**
74
+ * uuid: 40a45eac-c83f-4740-901a-20b22d15a39f
75
+ */
76
+ public function testDNASequenceWithMultipleNucleotides (): void
55
77
{
56
78
$ this ->assertSame ([
57
79
'a ' => 20 ,
@@ -60,4 +82,13 @@ public function testDNASequence(): void
60
82
'g ' => 17 ,
61
83
], nucleotideCount ('AGCTTTTCATTCTGACTGCAACGGGCAATATGTCTCTGTGTGGATTAAAAAAAGAGTGTCTGATAGCAGC ' ));
62
84
}
85
+
86
+ /**
87
+ * uuid: b4c47851-ee9e-4b0a-be70-a86e343bd851
88
+ */
89
+ public function testDNASequenceWithInvalidNucleotides (): void
90
+ {
91
+ $ this ->expectException (Exception::class);
92
+ nucleotideCount ('AGXXACT ' );
93
+ }
63
94
}
0 commit comments