다음 코드가 있는데 컨트롤러 만 테스트하면 매개 변수로 요청됩니다. 그러나커널 부팅 오류 - 심포니 netbeans
Warning: Deprecated JSON test listener used
나는 이러한 오류가 고칠 수있는 방법
PayrollperiodControllerTest::testPayrollWeekCreateAction Error: Call to undefined method PayrollperiodControllerTest::bootKernel()
class PayrollperiodControllerTest extends PHPUnit_Framework_TestCase {
/**
* @var \Doctrine\ORM\EntityManager
*/
private $em;
/**
* {@inheritDoc}
*/
public function setUp()
{
self::bootKernel();
$this->em = static::$kernel->getContainer()
->get('doctrine')
->getManager();
}
public function testPayrollWeekCreateAction(Request $request) {
$request = Request::create('http://localhost:8000/web/app_dev.php/payrollperiod/new', 'GET');
$result=$this->em->handle($request);
$this->assertTrue($result->isSuccessful);
}
/**
* {@inheritDoc}
*/
public function tearDown() {
parent::tearDown();
$this->em->close();
$this->em = null; //avoid memory Leaks
}
}
가 계속?
요청을 처리 할 수없는 하나의 EntityManager (
희망 : 대신의
을 메서드 핸들이 없다) 아마도 오타가 있을까요? – Matteo
@Matteo 메소드 핸들이란 무엇입니까? 나는 컨트롤러에서 enitiy 관리자를 사용했습니다. – Zed