@@ -40,7 +40,7 @@ public function testServiceFailureNoIdReturned(): void
4040
4141 $ findByCompany = $ companyMapper ->domain ($ companyData );
4242
43- $ userRepository = $ this
43+ $ companyRepository = $ this
4444 ->getMockBuilder (CompanyRepository::class)
4545 ->disableOriginalConstructor ()
4646 ->onlyMethods (
@@ -51,10 +51,10 @@ public function testServiceFailureNoIdReturned(): void
5151 )
5252 ->getMock ()
5353 ;
54- $ userRepository ->method ('update ' )->willReturn (0 );
55- $ userRepository ->method ('findById ' )->willReturn ($ findByCompany );
54+ $ companyRepository ->method ('update ' )->willReturn (0 );
55+ $ companyRepository ->method ('findById ' )->willReturn ($ findByCompany );
5656
57- $ this ->container ->setShared (CompanyRepository::class, $ userRepository );
57+ $ this ->container ->setShared (CompanyRepository::class, $ companyRepository );
5858
5959 /**
6060 * Add a user in the repository for the session
@@ -108,7 +108,7 @@ public function testServiceFailurePdoError(): void
108108
109109 $ findByCompany = $ companyMapper ->domain ($ companyData );
110110
111- $ userRepository = $ this
111+ $ companyRepository = $ this
112112 ->getMockBuilder (CompanyRepository::class)
113113 ->disableOriginalConstructor ()
114114 ->onlyMethods (
@@ -119,13 +119,13 @@ public function testServiceFailurePdoError(): void
119119 )
120120 ->getMock ()
121121 ;
122- $ userRepository ->method ('findById ' )->willReturn ($ findByCompany );
123- $ userRepository
122+ $ companyRepository ->method ('findById ' )->willReturn ($ findByCompany );
123+ $ companyRepository
124124 ->method ('update ' )
125125 ->willThrowException (new PDOException ($ message ))
126126 ;
127127
128- $ this ->container ->setShared (CompanyRepository::class, $ userRepository );
128+ $ this ->container ->setShared (CompanyRepository::class, $ companyRepository );
129129
130130 /**
131131 * Add a user in the repository for the session
@@ -172,7 +172,7 @@ public function testServiceFailureRecordNotFound(): void
172172 {
173173 /** @var CompanyMapper $companyMapper */
174174 $ companyMapper = $ this ->container ->get (CompanyMapper::class);
175- $ userRepository = $ this
175+ $ companyRepository = $ this
176176 ->getMockBuilder (CompanyRepository::class)
177177 ->disableOriginalConstructor ()
178178 ->onlyMethods (
@@ -182,9 +182,9 @@ public function testServiceFailureRecordNotFound(): void
182182 )
183183 ->getMock ()
184184 ;
185- $ userRepository ->method ('findById ' )->willReturn (null );
185+ $ companyRepository ->method ('findById ' )->willReturn (null );
186186
187- $ this ->container ->setShared (CompanyRepository::class, $ userRepository );
187+ $ this ->container ->setShared (CompanyRepository::class, $ companyRepository );
188188
189189 /** @var CompanyPutHandler $handler */
190190 $ handler = $ this ->container ->get (CompanyPutHandler::class);
0 commit comments