app = new WikiApp(); } #[\PHPUnit\Framework\Attributes\Group('module')] #[\PHPUnit\Framework\Attributes\TestDox('The model has the expected default values after initialization')] public function testDefault() : void { self::assertEquals(0, $this->app->id); self::assertEquals('', $this->app->name); } #[\PHPUnit\Framework\Attributes\Group('module')] #[\PHPUnit\Framework\Attributes\TestDox('The name can be correctly set and returned')] public function testNameInputOutput() : void { $this->app->name = 'Test name'; self::assertEquals('Test name', $this->app->name); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->app->name = 'Title'; $serialized = $this->app->jsonSerialize(); self::assertEquals( [ 'id' => 0, 'name' => 'Title', ], $serialized ); } }