testfile = $root . $this->testfile; $this->testobject = new Trf16(); $this->testobject->read($this->testfile); } public function testReadTournamentName(): void { $this->assertEquals('Blackbird Chess Unit Test Tournament', $this->testobject->Tournament->Name); } public function testReadTournamentLocation(): void { $this->assertEquals('Waregem', $this->testobject->Tournament->OrganiserPlace); } public function testReadTournamentFederation(): void { $this->assertEquals('BEL', $this->testobject->Tournament->OrganiserCountry); } public function testReadTournamentStartDate(): void { $expected = DateTime::createFromFormat("Y/m/d", "2023/01/14"); $this->assertEquals($expected, $this->testobject->Tournament->StartDate); } public function testReadTournamentEndDate(): void { $expected = DateTime::createFromFormat("Y/m/d", "2023/01/14"); $this->assertEquals($expected, $this->testobject->Tournament->EndDate); } public function testReadTournamentArbiter(): void { $this->assertEquals("Jeroen De Meerleer", $this->testobject->Tournament->Arbiters[0]); } public function testReadTournamentDeputyArbiter(): void { $this->assertEquals("Jerry The Blackbird", $this->testobject->Tournament->Arbiters[1]); } public function testReadPlayerInitialRank(): void { $this->assertEquals(1, $this->testobject->Tournament->Players[0]->InitialRank); } public function testReadPlayerSex(): void { $this->assertEquals(Gender::MALE, $this->testobject->Tournament->Players[0]->Gender); } public function testReadPlayerTitle(): void { $this->assertEquals(Title::WIM, $this->testobject->Tournament->Players[1]->Title); } public function testReadPlayerName(): void { $this->assertEquals('Player 3', $this->testobject->Tournament->Players[0]->Name); } public function testReadPlayerRating(): void { $this->assertEquals(1850, $this->testobject->Tournament->Players[0]->getElo('Fide')); } public function testReadPlayerFederation(): void { $this->assertEquals('BEL', $this->testobject->Tournament->Players[0]->Nation); } public function testReadPlayerID(): void { $this->assertEquals('0', $this->testobject->Tournament->Players[0]->GetId('Fide')); } public function testReadPlayerBirthday(): void { $expected = DateTime::createFromFormat("Y/m/d", "1900/01/01"); $this->assertEquals($expected, $this->testobject->Tournament->Players[0]->DateOfBirth); } public function testReadPlayerPoints(): void { $this->assertEquals(7, $this->testobject->Tournament->Players[0]->Points); } public function testReadPlayerRank(): void { $this->assertEquals(3, $this->testobject->Tournament->Players[0]->Rank); } public function testReadPlayerPairing1Opponent(): void { $this->assertEquals($this->testobject->Tournament->Players[7], $this->testobject->Tournament->Players[0]->Pairings[0]->Opponent); } }