{{VARIABLE_NAME}} = new {{ENTITY_NAME}}(); } /** * tearDown method */ protected function tearDown(): void { unset($this->{{VARIABLE_NAME}}); parent::tearDown(); } /** * Test accessible fields configuration */ public function testAccessibleFields(): void { // Arrange $data = [ 'name' => 'John Doe', 'email' => 'john@example.com', 'id' => 999, // Typically non-accessible or guarded ]; // Act $this->{{VARIABLE_NAME}}->set($data); // Assert $this->assertSame('John Doe', $this->{{VARIABLE_NAME}}->name); $this->assertSame('john@example.com', $this->{{VARIABLE_NAME}}->email); } /** * Test virtual fields if present */ public function testVirtualProperties(): void { // Arrange $this->{{VARIABLE_NAME}}->set([ 'first_name' => 'John', 'last_name' => 'Doe', ]); // Act & Assert $fullName = $this->{{VARIABLE_NAME}}->full_name ?? ($this->{{VARIABLE_NAME}}->first_name . ' ' . $this->{{VARIABLE_NAME}}->last_name); $this->assertSame('John Doe', $fullName); } }