Spaces:
Sleeping
Sleeping
Claude Sonnet 4.6
feat(backend): replace backend with peter branch + Emergency Care integration
6773345 Download tests/Unit/CalendlyWebhookDateTimeTest.php from nyakslamo/mdn-backend: direct link, hf CLI and curl.
- Browser
- Download file 913 Bytes
-
https://huggingface.co/spaces/nyakslamo/mdn-backend/resolve/main/tests/Unit/CalendlyWebhookDateTimeTest.php
- Command line
-
hf download hf://spaces/nyakslamo/mdn-backend/tests/Unit/CalendlyWebhookDateTimeTest.php
-
curl -L -o CalendlyWebhookDateTimeTest.php https://huggingface.co/spaces/nyakslamo/mdn-backend/resolve/main/tests/Unit/CalendlyWebhookDateTimeTest.php
913 Bytes
| namespace Tests\Unit; | |
| use App\Domain\Applications\ApplicationService; | |
| use ReflectionClass; | |
| use Tests\TestCase; | |
| class CalendlyWebhookDateTimeTest extends TestCase | |
| { | |
| public function test_calendly_iso_timestamp_is_normalized_for_database(): void | |
| { | |
| $this->assertSame( | |
| '2026-07-03 13:30:00', | |
| $this->normalize('2026-07-03T13:30:00.000000Z'), | |
| ); | |
| } | |
| public function test_invalid_calendly_timestamp_returns_null(): void | |
| { | |
| $this->assertNull($this->normalize('not-a-date')); | |
| } | |
| private function normalize(mixed $value): ?string | |
| { | |
| $reflection = new ReflectionClass(ApplicationService::class); | |
| $service = $reflection->newInstanceWithoutConstructor(); | |
| $method = $reflection->getMethod('calendlyDateTimeForDatabase'); | |
| $method->setAccessible(true); | |
| return $method->invoke($service, $value); | |
| } | |
| } | |