From 1024e7d99277f385ccf8d0a6a7a4b9ef1b8e50b3 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 21 May 2019 07:46:32 +0100 Subject: [PATCH] Get the sessions for a speaker --- src/Speakers/tests/SpeakerTest.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Speakers/tests/SpeakerTest.php b/src/Speakers/tests/SpeakerTest.php index e13685c..d8ae9fc 100644 --- a/src/Speakers/tests/SpeakerTest.php +++ b/src/Speakers/tests/SpeakerTest.php @@ -22,7 +22,17 @@ class SpeakerTest extends TestCase /** @test */ public function get_sessions_for_a_speaker() { - $this->markTestIncomplete(); + $speaker = ['title' => 'Oliver Davies']; + + $sessions = [ + ['title' => 'Introduction to Views', 'speakers' => ['Tom Metcalfe']], + ['title' => 'Test Driven Drupal', 'speakers' => ['Oliver Davies']], + ]; + + $sessions = $this->extension->getSpeakerSessions($speaker, $sessions); + + $this->assertCount(1, $sessions); + $this->assertSame('Test Driven Drupal', $sessions[0]['title']); } /** @test */