This repository has been archived on 2025-09-29. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
drupalcampbristol/src/Speakers/tests/SpeakerTest.php

44 lines
1,021 B
PHP
Raw Normal View History

2019-05-21 07:20:31 +01:00
<?php
namespace App\Tests\Speakers;
use App\Speakers\TwigExtension\SpeakersExtension;
use PHPUnit\Framework\TestCase;
class SpeakerTest extends TestCase
{
/**
* @var \App\Speakers\TwigExtension\SpeakersExtension
*/
private $extension;
protected function setUp(): void
{
parent::setUp();
$this->extension = new SpeakersExtension();
}
/** @test */
public function get_sessions_for_a_speaker()
{
2019-05-21 07:46:32 +01:00
$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']);
2019-05-21 07:20:31 +01:00
}
/** @test */
public function get_speakers_for_a_session()
{
$this->markTestIncomplete();
}
}