cc = new CostCenter(); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testDefault() : void { self::assertEquals(0, $this->cc->id); self::assertEquals('', $this->cc->code); self::assertNull($this->cc->parent); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testCodeInputOutput() : void { $this->cc->code = 'TestCode'; self::assertEquals('TestCode', $this->cc->code); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testParentInputOutput() : void { $this->cc->parent = 1; self::assertEquals(1, $this->cc->parent); } #[\PHPUnit\Framework\Attributes\Group('module')] public function testSerialize() : void { $this->cc->code = '123'; self::assertEquals( [ 'id' => 0, 'code' => '123', 'parent' => null, ], $this->cc->jsonSerialize() ); } }