l11n = new ContractTypeL11n(); } /** * @covers Modules\ContractManagement\Models\ContractTypeL11n * @group module */ public function testDefault() : void { self::assertEquals(0, $this->l11n->getId()); self::assertEquals('', $this->l11n->title); self::assertEquals(0, $this->l11n->type); self::assertEquals(ISO639x1Enum::_EN, $this->l11n->getLanguage()); } /** * @covers Modules\ContractManagement\Models\ContractTypeL11n * @group module */ public function testNameInputOutput() : void { $this->l11n->title = 'TestName'; self::assertEquals('TestName', $this->l11n->title); } /** * @covers Modules\ContractManagement\Models\ContractTypeL11n * @group module */ public function testLanguageInputOutput() : void { $this->l11n->setLanguage(ISO639x1Enum::_DE); self::assertEquals(ISO639x1Enum::_DE, $this->l11n->getLanguage()); } /** * @covers Modules\ContractManagement\Models\ContractTypeL11n * @group module */ public function testSerialize() : void { $this->l11n->title = 'Title'; $this->l11n->type = 2; $this->l11n->setLanguage(ISO639x1Enum::_DE); self::assertEquals( [ 'id' => 0, 'title' => 'Title', 'type' => 2, 'language' => ISO639x1Enum::_DE, ], $this->l11n->jsonSerialize() ); } }