ฉันต้องกด Enter เมื่อรันการทดสอบโดยใช้ phpunit ใน Laravel 5.7
ในการทดสอบทุกครั้งฉันได้รับข้อความต่อไปนี้:
1) Tests\Feature\DepartmentsTest::a_admin_can_create_a_department Mockery\Exception\BadMethodCallException: ได้รับ Mockery
Illuminate_Console_OutputStyle::askQuestion() แต่ไม่มีการระบุความคาดหวังpublic $mockConsoleOutput = false;
โดยการตั้งค่าต่อไปนี้เป็นเท็จ ข้อผิดพลาดจะหายไป:
public $mockConsoleOutput = false;
หลังจากนั้นหน้าต่างค้างในการเรียกใช้ชุดการทดสอบ และฉันต้องกด Enter เพื่อทำการทดสอบ
ฉันจะแก้ไขสิ่งนั้นได้อย่างไร?
ฉันใช้ Windows 10 + PHPUnit 7.5.1 และ Laravel 5.7.19
ขอบคุณล่วงหน้า!
/** @test */
public function a_admin_can_create_a_department()
{
// $this->withoutExceptionHandling();
$attributes = [
'description' => 'Service',
'accessible_by_depart' => true
];
$this->post('/tools/api/storeDepartment', $attributes);
$this->assertDatabaseHas('departments', $attributes);
}
Tests\Feature\DepartmentsTest::a_admin_can_create_a_department
ได้หรือไม่ - person Peter   schedule 21.12.2018$this->post()
ของคุณด้วยได้ไหม โดยพื้นฐานแล้วเราจำเป็นต้องดูว่าคุณกำลังตั้งค่าการเยาะเย้ยของคุณอยู่ที่ไหน - person Peter   schedule 22.12.2018