Category : factory

Hello i have one logic problem. public function addExternalApiSystem( string $systemName, Request $request, ExternalApiSystemManage $systemManage ) { if (isset(systemName)) { $system = $systemManage->manage($systemName); } return $this->json([‘system’ => system], 200); } And here is my ExternalSystemManage class class ExternalApiSystemManage { /** * @var ExternalApiSystemRepository */ private ExternalApiSystemRepository $apiSystemRepository; /** * @var ExternalApiSystemRegisterer */ private ExternalApiSystemRegisterer $apiSystemRegisterer; ..

Read more

Hello i have problem with my test. I’m trying to test UserFactory which is creating UserObject by UserDto data. I dont know how to test it because factory need PasswordEncoder in dependencies. use AppEntityUser; use AppServiceFactoryUserFactory; use PHPUnitFrameworkMockObjectMockObject as MockObject; use PHPUnitFrameworkTestCase; class UserFactoryTest extends TestCase { /** * @covers UserFactory */ public function testShouldCreateUserObjectFromUserDto() ..

Read more