From 3f405d455bb2870fa20a14236d71746dff3cc911 Mon Sep 17 00:00:00 2001 From: Yassir Hannoun Date: Sat, 13 Aug 2016 15:39:13 +0200 Subject: [PATCH 1/2] Fixed failing specs on windows (PHP 5.6.8) --- spec/DigitalOceanV2/Api/ActionSpec.php | 4 ++-- spec/DigitalOceanV2/Api/DropletSpec.php | 4 ++-- spec/DigitalOceanV2/Api/FloatingIpSpec.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/spec/DigitalOceanV2/Api/ActionSpec.php b/spec/DigitalOceanV2/Api/ActionSpec.php index f73c453e..74206ad7 100644 --- a/spec/DigitalOceanV2/Api/ActionSpec.php +++ b/spec/DigitalOceanV2/Api/ActionSpec.php @@ -142,9 +142,9 @@ function it_returns_an_action_entity_get_by_its_id($adapter) function it_throws_an_http_exception_if_requested_action_does_not_exist($adapter) { $adapter - ->get('https://api.digitalocean.com/v2/actions/123456789123456789') + ->get('https://api.digitalocean.com/v2/actions/1234567') ->willThrow(new HttpException('Request not processed.')); - $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(123456789123456789); + $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(1234567); } } diff --git a/spec/DigitalOceanV2/Api/DropletSpec.php b/spec/DigitalOceanV2/Api/DropletSpec.php index 2a77e62c..5dd3702c 100644 --- a/spec/DigitalOceanV2/Api/DropletSpec.php +++ b/spec/DigitalOceanV2/Api/DropletSpec.php @@ -248,10 +248,10 @@ function it_returns_a_droplet_entity_even_if_backup_is_disabled($adapter) function it_throws_an_http_exception_if_requested_droplet_does_not_exist($adapter) { $adapter - ->get('https://api.digitalocean.com/v2/droplets/123456789123456789') + ->get('https://api.digitalocean.com/v2/droplets/1234567') ->willThrow(new HttpException('Request not processed.')); - $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(123456789123456789); + $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(1234567); } function it_returns_the_created_droplet_entity_without_ssh_keys($adapter) diff --git a/spec/DigitalOceanV2/Api/FloatingIpSpec.php b/spec/DigitalOceanV2/Api/FloatingIpSpec.php index 10029eaa..5c0e9c04 100644 --- a/spec/DigitalOceanV2/Api/FloatingIpSpec.php +++ b/spec/DigitalOceanV2/Api/FloatingIpSpec.php @@ -90,10 +90,10 @@ function it_returns_a_floating_ip_entity_get_by_its_id($adapter) function it_throws_an_http_exception_if_requested_floating_id_does_not_exist($adapter) { $adapter - ->get('https://api.digitalocean.com/v2/floating_ips/123456789123456789') + ->get('https://api.digitalocean.com/v2/floating_ips/1234567') ->willThrow(new HttpException('Request not processed.')); - $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(123456789123456789); + $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(1234567); } function it_returns_the_created_floating_id_entity_assigned_to_droplet($adapter) From 2b3c32144c855f6fec8f1fbfb06bb5cd7ec71efa Mon Sep 17 00:00:00 2001 From: Yassir Hannoun Date: Sat, 13 Aug 2016 15:43:28 +0200 Subject: [PATCH 2/2] Formatting the code of modified files --- spec/DigitalOceanV2/Api/ActionSpec.php | 12 ++-- spec/DigitalOceanV2/Api/DropletSpec.php | 74 +++++++++++----------- spec/DigitalOceanV2/Api/FloatingIpSpec.php | 28 ++++---- 3 files changed, 57 insertions(+), 57 deletions(-) diff --git a/spec/DigitalOceanV2/Api/ActionSpec.php b/spec/DigitalOceanV2/Api/ActionSpec.php index 74206ad7..d44ba218 100644 --- a/spec/DigitalOceanV2/Api/ActionSpec.php +++ b/spec/DigitalOceanV2/Api/ActionSpec.php @@ -7,17 +7,17 @@ class ActionSpec extends \PhpSpec\ObjectBehavior { - function let(AdapterInterface $adapter) + public function let(AdapterInterface $adapter) { $this->beConstructedWith($adapter); } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('DigitalOceanV2\Api\Action'); } - function it_returns_an_empty_array($adapter) + public function it_returns_an_empty_array($adapter) { $adapter->get('https://api.digitalocean.com/v2/actions?per_page=200')->willReturn('{"actions": []}'); @@ -26,7 +26,7 @@ function it_returns_an_empty_array($adapter) $actions->shouldHaveCount(0); } - function it_returns_an_array_of_action_entity($adapter) + public function it_returns_an_array_of_action_entity($adapter) { $total = 3; $adapter @@ -105,7 +105,7 @@ function it_returns_an_array_of_action_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_an_action_entity_get_by_its_id($adapter) + public function it_returns_an_action_entity_get_by_its_id($adapter) { $adapter ->get('https://api.digitalocean.com/v2/actions/123') @@ -139,7 +139,7 @@ function it_returns_an_action_entity_get_by_its_id($adapter) $this->getMeta()->shouldBeNull(); } - function it_throws_an_http_exception_if_requested_action_does_not_exist($adapter) + public function it_throws_an_http_exception_if_requested_action_does_not_exist($adapter) { $adapter ->get('https://api.digitalocean.com/v2/actions/1234567') diff --git a/spec/DigitalOceanV2/Api/DropletSpec.php b/spec/DigitalOceanV2/Api/DropletSpec.php index 5dd3702c..a6d67b1a 100644 --- a/spec/DigitalOceanV2/Api/DropletSpec.php +++ b/spec/DigitalOceanV2/Api/DropletSpec.php @@ -7,17 +7,17 @@ class DropletSpec extends \PhpSpec\ObjectBehavior { - function let(AdapterInterface $adapter) + public function let(AdapterInterface $adapter) { $this->beConstructedWith($adapter); } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('DigitalOceanV2\Api\Droplet'); } - function it_returns_an_empty_array($adapter) + public function it_returns_an_empty_array($adapter) { $adapter->get('https://api.digitalocean.com/v2/droplets?per_page=200&page=1')->willReturn('{"droplets": []}'); @@ -26,7 +26,7 @@ function it_returns_an_empty_array($adapter) $droplets->shouldHaveCount(0); } - function it_returns_an_array_of_droplet_entity($adapter) + public function it_returns_an_array_of_droplet_entity($adapter) { $total = 3; $adapter @@ -44,7 +44,7 @@ function it_returns_an_array_of_droplet_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_an_array_of_droplet_neighbors_for_a_given_droplet_id($adapter) + public function it_returns_an_array_of_droplet_neighbors_for_a_given_droplet_id($adapter) { $adapter ->get('https://api.digitalocean.com/v2/droplets/123/neighbors') @@ -58,7 +58,7 @@ function it_returns_an_array_of_droplet_neighbors_for_a_given_droplet_id($adapte } } - function it_returns_an_array_of_upgrade_entity($adapter) + public function it_returns_an_array_of_upgrade_entity($adapter) { $adapter ->get('https://api.digitalocean.com/v2/droplet_upgrades') @@ -72,7 +72,7 @@ function it_returns_an_array_of_upgrade_entity($adapter) } } - function it_returns_an_array_of_droplet_that_are_running_on_the_same_physical_hardware($adapter) + public function it_returns_an_array_of_droplet_that_are_running_on_the_same_physical_hardware($adapter) { $adapter ->get('https://api.digitalocean.com/v2/reports/droplet_neighbors') @@ -86,7 +86,7 @@ function it_returns_an_array_of_droplet_that_are_running_on_the_same_physical_ha } } - function it_returns_a_droplet_entity_get_by_its_id($adapter) + public function it_returns_a_droplet_entity_get_by_its_id($adapter) { $adapter ->get('https://api.digitalocean.com/v2/droplets/14') @@ -174,8 +174,8 @@ function it_returns_a_droplet_entity_get_by_its_id($adapter) $droplet->kernel->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Kernel'); $droplet->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); $droplet->image->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Image'); - $droplet->volumeIds[0]->shouldBe("123321123"); - $droplet->volumeIds[1]->shouldBe("789987789"); + $droplet->volumeIds[0]->shouldBe('123321123'); + $droplet->volumeIds[1]->shouldBe('789987789'); $this->getMeta()->shouldBeNull(); $droplet->sizeSlug->shouldBe('512mb'); $droplet->backupsEnabled->shouldBe(true); @@ -185,7 +185,7 @@ function it_returns_a_droplet_entity_get_by_its_id($adapter) $droplet->nextBackupWindow->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\NextBackupWindow'); } - function it_returns_a_droplet_entity_even_if_backup_is_disabled($adapter) + public function it_returns_a_droplet_entity_even_if_backup_is_disabled($adapter) { $adapter ->get('https://api.digitalocean.com/v2/droplets/1234') @@ -245,7 +245,7 @@ function it_returns_a_droplet_entity_even_if_backup_is_disabled($adapter) $droplet->nextBackupWindow->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\NextBackupWindow'); } - function it_throws_an_http_exception_if_requested_droplet_does_not_exist($adapter) + public function it_throws_an_http_exception_if_requested_droplet_does_not_exist($adapter) { $adapter ->get('https://api.digitalocean.com/v2/droplets/1234567') @@ -254,7 +254,7 @@ function it_throws_an_http_exception_if_requested_droplet_does_not_exist($adapte $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(1234567); } - function it_returns_the_created_droplet_entity_without_ssh_keys($adapter) + public function it_returns_the_created_droplet_entity_without_ssh_keys($adapter) { $adapter ->post( @@ -266,7 +266,7 @@ function it_returns_the_created_droplet_entity_without_ssh_keys($adapter) $this->create('foo', 'nyc1', '512mb', 123456)->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Droplet'); } - function it_returns_the_created_droplet_entity_with_ssh_keys($adapter) + public function it_returns_the_created_droplet_entity_with_ssh_keys($adapter) { $adapter ->post( @@ -280,7 +280,7 @@ function it_returns_the_created_droplet_entity_with_ssh_keys($adapter) ->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Droplet'); } - function can_create_multiple_droplets_at_the_same_time($adapter) + public function can_create_multiple_droplets_at_the_same_time($adapter) { $adapter ->post( @@ -292,7 +292,7 @@ function can_create_multiple_droplets_at_the_same_time($adapter) $this->create(['foo', 'bar'], 'nyc1', '512mb', 123456)->shouldReturn(null); } - function it_throws_an_http_exception_if_not_possible_to_create_a_droplet($adapter) + public function it_throws_an_http_exception_if_not_possible_to_create_a_droplet($adapter) { $adapter ->post( @@ -304,7 +304,7 @@ function it_throws_an_http_exception_if_not_possible_to_create_a_droplet($adapte $this->shouldThrow(new HttpException('Request not processed.'))->duringCreate('foo', 'nyc1', '512mb', 123456); } - function it_deletes_the_droplet_and_returns_nothing($adapter) + public function it_deletes_the_droplet_and_returns_nothing($adapter) { $adapter ->delete('https://api.digitalocean.com/v2/droplets/123') @@ -313,7 +313,7 @@ function it_deletes_the_droplet_and_returns_nothing($adapter) $this->delete(123); } - function it_throws_an_http_exception_when_trying_to_delete_inexisting_droplet($adapter) + public function it_throws_an_http_exception_when_trying_to_delete_inexisting_droplet($adapter) { $adapter ->delete('https://api.digitalocean.com/v2/droplets/123') @@ -322,7 +322,7 @@ function it_throws_an_http_exception_when_trying_to_delete_inexisting_droplet($a $this->shouldThrow(new HttpException('Request not processed.'))->duringDelete(123); } - function it_returns_an_array_of_droplets_kernel_entity($adapter) + public function it_returns_an_array_of_droplets_kernel_entity($adapter) { $total = 3; $adapter @@ -340,7 +340,7 @@ function it_returns_an_array_of_droplets_kernel_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_an_array_of_droplets_snapshots_which_are_image_entity($adapter) + public function it_returns_an_array_of_droplets_snapshots_which_are_image_entity($adapter) { $total = 3; $adapter @@ -358,7 +358,7 @@ function it_returns_an_array_of_droplets_snapshots_which_are_image_entity($adapt $meta->total->shouldBe($total); } - function it_returns_an_array_of_droplets_backup_which_are_image_entity($adapter) + public function it_returns_an_array_of_droplets_backup_which_are_image_entity($adapter) { $total = 3; $adapter @@ -375,7 +375,7 @@ function it_returns_an_array_of_droplets_backup_which_are_image_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_an_array_of_droplets_action_entity($adapter) + public function it_returns_an_array_of_droplets_action_entity($adapter) { $total = 3; $adapter @@ -394,7 +394,7 @@ function it_returns_an_array_of_droplets_action_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_the_given_droplets_action_get_by_its_id($adapter) + public function it_returns_the_given_droplets_action_get_by_its_id($adapter) { $adapter->get('https://api.digitalocean.com/v2/droplets/123/actions/456')->willReturn('{"action": {"region": {}}}'); @@ -403,7 +403,7 @@ function it_returns_the_given_droplets_action_get_by_its_id($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_reboot($adapter) + public function it_returns_the_action_entity_after_reboot($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'reboot']) @@ -414,7 +414,7 @@ function it_returns_the_action_entity_after_reboot($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_power_cycle($adapter) + public function it_returns_the_action_entity_after_power_cycle($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'power_cycle']) @@ -425,7 +425,7 @@ function it_returns_the_action_entity_after_power_cycle($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_shutdown($adapter) + public function it_returns_the_action_entity_after_shutdown($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'shutdown']) @@ -436,7 +436,7 @@ function it_returns_the_action_entity_after_shutdown($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_power_off($adapter) + public function it_returns_the_action_entity_after_power_off($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'power_off']) @@ -447,7 +447,7 @@ function it_returns_the_action_entity_after_power_off($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_power_on($adapter) + public function it_returns_the_action_entity_after_power_on($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'power_on']) @@ -458,7 +458,7 @@ function it_returns_the_action_entity_after_power_on($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_password_reset($adapter) + public function it_returns_the_action_entity_after_password_reset($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'password_reset']) @@ -469,7 +469,7 @@ function it_returns_the_action_entity_after_password_reset($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_resize($adapter) + public function it_returns_the_action_entity_after_resize($adapter) { $adapter ->post( @@ -483,7 +483,7 @@ function it_returns_the_action_entity_after_resize($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_restore($adapter) + public function it_returns_the_action_entity_after_restore($adapter) { $adapter ->post( @@ -497,7 +497,7 @@ function it_returns_the_action_entity_after_restore($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_rebuild($adapter) + public function it_returns_the_action_entity_after_rebuild($adapter) { $adapter ->post( @@ -511,7 +511,7 @@ function it_returns_the_action_entity_after_rebuild($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_changing_kernel($adapter) + public function it_returns_the_action_entity_after_changing_kernel($adapter) { $adapter ->post( @@ -525,7 +525,7 @@ function it_returns_the_action_entity_after_changing_kernel($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_ipv6_enabled($adapter) + public function it_returns_the_action_entity_after_ipv6_enabled($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'enable_ipv6']) @@ -536,7 +536,7 @@ function it_returns_the_action_entity_after_ipv6_enabled($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_backups_are_enabled($adapter) + public function it_returns_the_action_entity_after_backups_are_enabled($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'enable_backups']) @@ -547,7 +547,7 @@ function it_returns_the_action_entity_after_backups_are_enabled($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_backups_are_disabled($adapter) + public function it_returns_the_action_entity_after_backups_are_disabled($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'disable_backups']) @@ -558,7 +558,7 @@ function it_returns_the_action_entity_after_backups_are_disabled($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_enabling_private_network($adapter) + public function it_returns_the_action_entity_after_enabling_private_network($adapter) { $adapter ->post('https://api.digitalocean.com/v2/droplets/123/actions', ['type' => 'enable_private_networking']) diff --git a/spec/DigitalOceanV2/Api/FloatingIpSpec.php b/spec/DigitalOceanV2/Api/FloatingIpSpec.php index 5c0e9c04..c278e01e 100644 --- a/spec/DigitalOceanV2/Api/FloatingIpSpec.php +++ b/spec/DigitalOceanV2/Api/FloatingIpSpec.php @@ -7,17 +7,17 @@ class FloatingIpSpec extends \PhpSpec\ObjectBehavior { - function let(AdapterInterface $adapter) + public function let(AdapterInterface $adapter) { $this->beConstructedWith($adapter); } - function it_is_initializable() + public function it_is_initializable() { $this->shouldHaveType('DigitalOceanV2\Api\FloatingIp'); } - function it_returns_an_empty_array($adapter) + public function it_returns_an_empty_array($adapter) { $adapter->get('https://api.digitalocean.com/v2/floating_ips?per_page=200')->willReturn('{"floating_ips": []}'); @@ -26,7 +26,7 @@ function it_returns_an_empty_array($adapter) $ips->shouldHaveCount(0); } - function it_returns_an_array_of_floating_ip_entity($adapter) + public function it_returns_an_array_of_floating_ip_entity($adapter) { $total = 3; $adapter @@ -44,7 +44,7 @@ function it_returns_an_array_of_floating_ip_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_a_floating_ip_entity_get_by_its_id($adapter) + public function it_returns_a_floating_ip_entity_get_by_its_id($adapter) { $adapter ->get('https://api.digitalocean.com/v2/floating_ips/45.55.96.47') @@ -87,7 +87,7 @@ function it_returns_a_floating_ip_entity_get_by_its_id($adapter) $this->getMeta()->shouldBeNull(); } - function it_throws_an_http_exception_if_requested_floating_id_does_not_exist($adapter) + public function it_throws_an_http_exception_if_requested_floating_id_does_not_exist($adapter) { $adapter ->get('https://api.digitalocean.com/v2/floating_ips/1234567') @@ -96,7 +96,7 @@ function it_throws_an_http_exception_if_requested_floating_id_does_not_exist($ad $this->shouldThrow(new HttpException('Request not processed.'))->duringGetById(1234567); } - function it_returns_the_created_floating_id_entity_assigned_to_droplet($adapter) + public function it_returns_the_created_floating_id_entity_assigned_to_droplet($adapter) { $adapter ->post('https://api.digitalocean.com/v2/floating_ips', ['droplet_id' => 123456]) @@ -105,7 +105,7 @@ function it_returns_the_created_floating_id_entity_assigned_to_droplet($adapter) $this->createAssigned(123456)->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\FloatingIp'); } - function it_returns_the_created_floating_id_entity_reserved_by_region($adapter) + public function it_returns_the_created_floating_id_entity_reserved_by_region($adapter) { $adapter ->post('https://api.digitalocean.com/v2/floating_ips', ['region' => 'nyc3']) @@ -114,7 +114,7 @@ function it_returns_the_created_floating_id_entity_reserved_by_region($adapter) $this->createReserved('nyc3')->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\FloatingIp'); } - function it_deletes_the_floating_ip_and_returns_nothing($adapter) + public function it_deletes_the_floating_ip_and_returns_nothing($adapter) { $adapter ->delete('https://api.digitalocean.com/v2/floating_ips/123') @@ -123,7 +123,7 @@ function it_deletes_the_floating_ip_and_returns_nothing($adapter) $this->delete(123); } - function it_throws_an_http_exception_when_trying_to_delete_inexisting_floating_ip($adapter) + public function it_throws_an_http_exception_when_trying_to_delete_inexisting_floating_ip($adapter) { $adapter ->delete('https://api.digitalocean.com/v2/floating_ips/123') @@ -132,7 +132,7 @@ function it_throws_an_http_exception_when_trying_to_delete_inexisting_floating_i $this->shouldThrow(new HttpException('Request not processed.'))->duringDelete(123); } - function it_returns_an_array_of_floating_ips_action_entity($adapter) + public function it_returns_an_array_of_floating_ips_action_entity($adapter) { $total = 3; $adapter @@ -151,7 +151,7 @@ function it_returns_an_array_of_floating_ips_action_entity($adapter) $meta->total->shouldBe($total); } - function it_returns_the_given_floating_ips_action_get_by_its_id($adapter) + public function it_returns_the_given_floating_ips_action_get_by_its_id($adapter) { $adapter->get('https://api.digitalocean.com/v2/floating_ips/123/actions/456')->willReturn('{"action": {"region": {}}}'); @@ -160,7 +160,7 @@ function it_returns_the_given_floating_ips_action_get_by_its_id($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_assign($adapter) + public function it_returns_the_action_entity_after_assign($adapter) { $adapter ->post('https://api.digitalocean.com/v2/floating_ips/123/actions', ['type' => 'assign', 'droplet_id' => 456]) @@ -171,7 +171,7 @@ function it_returns_the_action_entity_after_assign($adapter) $action->region->shouldReturnAnInstanceOf('DigitalOceanV2\Entity\Region'); } - function it_returns_the_action_entity_after_unassign($adapter) + public function it_returns_the_action_entity_after_unassign($adapter) { $adapter ->post('https://api.digitalocean.com/v2/floating_ips/123/actions', ['type' => 'unassign'])