Skip to content

Commit 612a384

Browse files
authored
Add new test (#889)
1 parent f3a600e commit 612a384

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

exercises/practice/protein-translation/.meta/tests.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ description = "Translation stops if STOP codon in middle of three-codon sequence
8787
[2c2a2a60-401f-4a80-b977-e0715b23b93d]
8888
description = "Translation stops if STOP codon in middle of six-codon sequence"
8989

90+
[f6f92714-769f-4187-9524-e353e8a41a80]
91+
description = "Sequence of two non-STOP codons does not translate to a STOP codon"
92+
9093
[1e75ea2a-f907-4994-ae5c-118632a1cb0f]
9194
description = "Non-existing codon can't translate"
9295
include = false

exercises/practice/protein-translation/ProteinTranslationTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,18 @@ public function testTranslationStopsIfStopCodonInMiddleOfSixCodonSequence(): voi
256256
);
257257
}
258258

259+
/**
260+
* uuid f6f92714-769f-4187-9524-e353e8a41a80
261+
* @testdox Sequence of two non-STOP codons does not translate to a STOP codon
262+
*/
263+
public function testSequenceOfTwoNonStopCodonsDoesNotTranslateToAStopCodon(): void
264+
{
265+
$this->assertEquals(
266+
['Methionine', 'Methionine'],
267+
$this->translator->getProteins('AUGAUG')
268+
);
269+
}
270+
259271
/**
260272
* uuid 9eac93f3-627a-4c90-8653-6d0a0595bc6f
261273
* @testdox Unknown amino acids, not part of a codon, can't translate

0 commit comments

Comments
 (0)