Only confirmed sponsors are returned
This commit is contained in:
parent
b23d170804
commit
21d1bc113c
|
@ -28,6 +28,7 @@ class SponsorsExtension extends AbstractExtension
|
||||||
})
|
})
|
||||||
->filter->isConfirmed()
|
->filter->isConfirmed()
|
||||||
->map->getData()
|
->map->getData()
|
||||||
|
->values()
|
||||||
->toArray();
|
->toArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,16 @@ class SponsorsTest extends TestCase
|
||||||
/** @test */
|
/** @test */
|
||||||
public function only_confirmed_sponsors_are_returned()
|
public function only_confirmed_sponsors_are_returned()
|
||||||
{
|
{
|
||||||
$this->markTestIncomplete();
|
$data = [
|
||||||
|
Sponsor::LEVEL_GOLD => [
|
||||||
|
['name' => 'Acquia', 'confirmed' => false],
|
||||||
|
['name' => 'Microserve', 'confirmed' => true],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
$sponsors = $this->extension->getSponsors($data, Sponsor::LEVEL_GOLD);
|
||||||
|
|
||||||
|
$this->assertCount(1, $sponsors);
|
||||||
|
$this->assertSame('Microserve', $sponsors[0]['name']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue