Skip to content

Commit

Permalink
Add return typehints to channel API tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pamil committed Feb 2, 2018
1 parent a91ad9d commit 7c4d635
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions tests/Controller/ChannelApiTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class ChannelApiTest extends JsonApiTestCase
/**
* @test
*/
public function it_does_not_allow_to_show_channels_list_when_access_is_denied()
public function it_does_not_allow_to_show_channels_list_when_access_is_denied(): void
{
$this->loadFixturesFromFile('resources/channels.yml');

Expand All @@ -51,7 +51,7 @@ public function it_does_not_allow_to_show_channels_list_when_access_is_denied()
/**
* @test
*/
public function it_denies_creating_channels_for_non_authenticated_user()
public function it_denies_creating_channels_for_non_authenticated_user(): void
{
$this->client->request('POST', '/api/v1/channels/');

Expand All @@ -62,7 +62,7 @@ public function it_denies_creating_channels_for_non_authenticated_user()
/**
* @test
*/
public function it_does_not_allow_to_create_channel_without_specifying_required_data()
public function it_does_not_allow_to_create_channel_without_specifying_required_data(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');

Expand All @@ -75,7 +75,7 @@ public function it_does_not_allow_to_create_channel_without_specifying_required_
/**
* @test
*/
public function it_allows_indexing_channels()
public function it_allows_indexing_channels(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$this->loadFixturesFromFile('resources/channels.yml');
Expand All @@ -89,7 +89,7 @@ public function it_allows_indexing_channels()
/**
* @test
*/
public function it_denies_getting_channel_for_non_authenticated_user()
public function it_denies_getting_channel_for_non_authenticated_user(): void
{
$this->client->request('GET', '/api/v1/channels/none');

Expand All @@ -100,7 +100,7 @@ public function it_denies_getting_channel_for_non_authenticated_user()
/**
* @test
*/
public function it_does_not_allow_to_show_channel_when_it_does_not_exist()
public function it_does_not_allow_to_show_channel_when_it_does_not_exist(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');

Expand All @@ -113,7 +113,7 @@ public function it_does_not_allow_to_show_channel_when_it_does_not_exist()
/**
* @test
*/
public function it_allows_to_create_channel_with_required_data()
public function it_allows_to_create_channel_with_required_data(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$this->loadFixturesFromFile('resources/locales.yml');
Expand All @@ -140,7 +140,7 @@ public function it_allows_to_create_channel_with_required_data()
/**
* @test
*/
public function it_allows_to_create_channel_with_extra_data()
public function it_allows_to_create_channel_with_extra_data(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$this->loadFixturesFromFile('resources/locales.yml');
Expand Down Expand Up @@ -179,7 +179,7 @@ public function it_allows_to_create_channel_with_extra_data()
/**
* @test
*/
public function it_denies_updating_channel_for_non_authenticated_user()
public function it_denies_updating_channel_for_non_authenticated_user(): void
{
$this->client->request('PUT', '/api/v1/channels/1');

Expand All @@ -190,7 +190,7 @@ public function it_denies_updating_channel_for_non_authenticated_user()
/**
* @test
*/
public function it_does_not_allow_to_update_channel_without_specifying_required_data()
public function it_does_not_allow_to_update_channel_without_specifying_required_data(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$channels = $this->loadFixturesFromFile('resources/channels.yml');
Expand All @@ -207,7 +207,7 @@ public function it_does_not_allow_to_update_channel_without_specifying_required_
/**
* @test
*/
public function it_allows_to_update_channel()
public function it_allows_to_update_channel(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$channels = $this->loadFixturesFromFile('resources/channels.yml');
Expand Down Expand Up @@ -241,7 +241,7 @@ public function it_allows_to_update_channel()
/**
* @test
*/
public function it_allows_showing_channel()
public function it_allows_showing_channel(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$channels = $this->loadFixturesFromFile('resources/channels.yml');
Expand All @@ -257,7 +257,7 @@ public function it_allows_showing_channel()
/**
* @test
*/
public function it_returns_not_found_response_when_partially_updating_channel_which_does_not_exist()
public function it_returns_not_found_response_when_partially_updating_channel_which_does_not_exist(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');

Expand All @@ -270,7 +270,7 @@ public function it_returns_not_found_response_when_partially_updating_channel_wh
/**
* @test
*/
public function it_allows_to_partially_update_channel()
public function it_allows_to_partially_update_channel(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$channels = $this->loadFixturesFromFile('resources/channels.yml');
Expand Down Expand Up @@ -300,7 +300,7 @@ public function it_allows_to_partially_update_channel()
/**
* @test
*/
public function it_does_not_allow_to_delete_non_existing_channel()
public function it_does_not_allow_to_delete_non_existing_channel(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');

Expand All @@ -313,7 +313,7 @@ public function it_does_not_allow_to_delete_non_existing_channel()
/**
* @test
*/
public function it_allows_to_delete_channel()
public function it_allows_to_delete_channel(): void
{
$this->loadFixturesFromFile('authentication/api_administrator.yml');
$channels = $this->loadFixturesFromFile('resources/channels.yml');
Expand All @@ -335,7 +335,7 @@ public function it_allows_to_delete_channel()
*
* @return string
*/
private function getChannelUrl(ChannelInterface $channel)
private function getChannelUrl(ChannelInterface $channel): string
{
return '/api/v1/channels/' . $channel->getCode();
}
Expand Down

0 comments on commit 7c4d635

Please sign in to comment.