From 60b9e24d3f7823e6e446146c157b67de71a30ca9 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Sun, 9 Aug 2009 12:39:52 -0400 Subject: [PATCH] save transcript --- classes/WhatDidTheySay.php | 17 +++++++++++++++++ test/WhataDidTheySayTest.php | 24 ++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/classes/WhatDidTheySay.php b/classes/WhatDidTheySay.php index e69de29..d32851b 100644 --- a/classes/WhatDidTheySay.php +++ b/classes/WhatDidTheySay.php @@ -0,0 +1,17 @@ + diff --git a/test/WhataDidTheySayTest.php b/test/WhataDidTheySayTest.php index e69de29..8bb8ffa 100644 --- a/test/WhataDidTheySayTest.php +++ b/test/WhataDidTheySayTest.php @@ -0,0 +1,24 @@ +what = new WhatDidTheySay(); + } + + function testSaveTranscription() { + $this->what->save_transcript(1, "en", "This is a transcript"); + $this->assertEquals(array("en" => "This is a transcript"), get_post_meta(1, "provided_transcripts", true)); + + $this->what->save_transcript(1, "en", "this is a new transcript"); + $this->assertEquals(array("en" => "this is a new transcript"), get_post_meta(1, "provided_transcripts", true)); + + $this->what->save_transcript(1, "fr", "il s'agit d'une nouvelle transcription"); + $this->assertEquals(array("en" => "this is a new transcript", "fr" => "il s'agit d'une nouvelle transcription"), get_post_meta(1, "provided_transcripts", true)); + } +} + +?>