Skip to content

Commit 7ce17c2

Browse files
authored
[14.4] Fix the Create method for Environments (#648)
1 parent 4aa7d2a commit 7ce17c2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Api/Environments.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public function create($project_id, array $parameters = [])
5454
$resolver->setDefined('external_url')
5555
->setAllowedTypes('external_url', 'string');
5656

57-
return $this->post($this->getProjectPath($project_id, 'environment'), $resolver->resolve($parameters));
57+
return $this->post($this->getProjectPath($project_id, 'environments'), $resolver->resolve($parameters));
5858
}
5959

6060
/**

tests/Api/EnvironmentsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public function shouldCreateEnvironment(): void
166166
$api = $this->getApiMock();
167167
$api->expects($this->once())
168168
->method('post')
169-
->with('projects/1/environment', $params)
169+
->with('projects/1/environments', $params)
170170
->will($this->returnValue($expectedArray));
171171

172172
$this->assertEquals($expectedArray, $api->create(1, $params));

0 commit comments

Comments
 (0)