assertTrue($result->success); $this->assertSame('bnd-1', $result->bindingId); $this->assertSame('person', $result->targetEntity); $this->assertSame('email', $result->targetAttribute); $this->assertNull($result->oldValue); $this->assertSame('jan@example.nl', $result->newValue); $this->assertNull($result->exceptionClass); $this->assertNull($result->exceptionMessage); } public function test_failed_constructor_captures_exception_metadata(): void { $exception = new RuntimeException('boom'); $result = BindingApplicationResult::failed( bindingId: 'bnd-2', targetEntity: 'company', targetAttribute: 'name', e: $exception, ); $this->assertFalse($result->success); $this->assertSame('bnd-2', $result->bindingId); $this->assertNull($result->oldValue); $this->assertNull($result->newValue); $this->assertSame(RuntimeException::class, $result->exceptionClass); $this->assertSame('boom', $result->exceptionMessage); } }