Skip to content

Commit c8327e9

Browse files
committed
Updated a unit test (coverage increase)
1 parent 856e78b commit c8327e9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Symfony/src/Codebender/BuilderBundle/Tests/Controller/DefaultControllerUnitTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,10 @@ public function testCompileFalseCompilationWithStepIncluded() {
240240

241241
$controller->expects($this->at(0))->method('get')->with('codebender_builder.handler')
242242
->willReturn($apiHandler);
243-
$controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')->with(['files' => []])
244-
->willReturn(['files' => []]);
245-
$controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([])
243+
$controller->expects($this->at(1))->method('addUserIdProjectIdIfNotInRequest')
244+
->with(['files' => [], 'libraries' => []])
245+
->willReturn(['files' => [], 'libraries' => []]);
246+
$controller->expects($this->at(2))->method('returnProvidedAndFetchedLibraries')->with([], [])
246247
->willReturn(['libraries' => []]);
247248

248249
$container->expects($this->once())->method('getParameter')->with('compiler')
@@ -251,7 +252,7 @@ public function testCompileFalseCompilationWithStepIncluded() {
251252
->with('http://compiler/url', '{"files":[],"libraries":[]}')
252253
->willReturn('{"success":false,"message":"someError","step":5}');
253254

254-
$functionResponse = $function->invoke($controller, ['files' => []]);
255+
$functionResponse = $function->invoke($controller, ['files' => [], 'libraries' => []]);
255256

256257
$this->assertEquals('{"success":false,"message":"someError","step":5,"additionalCode":[]}', $functionResponse);
257258
}

0 commit comments

Comments
 (0)