Get speakers for a session
This commit is contained in:
parent
1024e7d992
commit
61c5325f78
|
@ -11,7 +11,8 @@
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"sculpin/sculpin": "^3",
|
"sculpin/sculpin": "^3",
|
||||||
"tightenco/collect": "^5.8"
|
"tightenco/collect": "^5.8",
|
||||||
|
"josephlavin/tap": "^1.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "composer run-script generate",
|
"dev": "composer run-script generate",
|
||||||
|
|
41
composer.lock
generated
41
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "2f8c5422287b9307fc790139f2c65ba7",
|
"content-hash": "c6414f5b440058283f14445f290d6df4",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "dflydev/ant-path-matcher",
|
"name": "dflydev/ant-path-matcher",
|
||||||
|
@ -446,6 +446,45 @@
|
||||||
],
|
],
|
||||||
"time": "2017-07-23T21:35:13+00:00"
|
"time": "2017-07-23T21:35:13+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "josephlavin/tap",
|
||||||
|
"version": "v1.0.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/josephlavin/tap.git",
|
||||||
|
"reference": "8733d96fb9b7d7dca204dfe59ec3ff34f3c69be9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/josephlavin/tap/zipball/8733d96fb9b7d7dca204dfe59ec3ff34f3c69be9",
|
||||||
|
"reference": "8733d96fb9b7d7dca204dfe59ec3ff34f3c69be9",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=5.6.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "~5.7"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"src/tap.php",
|
||||||
|
"src/TapProxy.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "Stand alone port of Laravel's tap method.",
|
||||||
|
"keywords": [
|
||||||
|
"laravel",
|
||||||
|
"php",
|
||||||
|
"tap"
|
||||||
|
],
|
||||||
|
"time": "2017-09-24T23:36:28+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "michelf/php-markdown",
|
"name": "michelf/php-markdown",
|
||||||
"version": "1.8.0",
|
"version": "1.8.0",
|
||||||
|
|
|
@ -38,6 +38,36 @@ class SpeakerTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function get_speakers_for_a_session()
|
public function get_speakers_for_a_session()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
$speakers = [
|
||||||
|
['title' => 'Oliver Davies'],
|
||||||
|
['title' => 'Phil Thomas'],
|
||||||
|
['title' => 'Tom Metcalfe'],
|
||||||
|
['title' => 'Ross Gratton'],
|
||||||
|
['title' => 'Dan McNamara'],
|
||||||
|
];
|
||||||
|
|
||||||
|
$session1 = [
|
||||||
|
'title' => 'Drupal in a microservice savannah',
|
||||||
|
'speakers' => [
|
||||||
|
'Phil Thomas',
|
||||||
|
'Ross Gratton',
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$session2 = [
|
||||||
|
'title' => 'The Real State of Drupal',
|
||||||
|
'speakers' => ['Dan McNamara'],
|
||||||
|
];
|
||||||
|
|
||||||
|
tap($this->extension->getSessionSpeakers($session1, $speakers), function (array $speakers) {
|
||||||
|
$this->assertCount(2, $speakers);
|
||||||
|
$this->assertSame('Phil Thomas', $speakers[0]['title']);
|
||||||
|
$this->assertSame('Ross Gratton', $speakers[1]['title']);
|
||||||
|
});
|
||||||
|
|
||||||
|
tap($this->extension->getSessionSpeakers($session2, $speakers), function (array $speakers) {
|
||||||
|
$this->assertCount(1, $speakers);
|
||||||
|
$this->assertSame('Dan McNamara', $speakers[0]['title']);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue