/** * @covers pgn\tags\UknownTag::setName() * @covers pgn\tags\UknownTag::set() * @covers pgn\tags\UknownTag::__toString() */ public function testToString() { $tagName = 'PlyCount'; $this->object->setName($tagName); $this->object->set('1'); $this->assertSame('[PlyCount "1"]', $this->object->__toString()); }
/** * */ public function testParseUknown() { $uknownTag = new UknownTag(); $uknownTag->setName("MyUknown"); $uknownTag->set("Some Ordinary Information"); $unparsedTag = '[MyUknown "Some Ordinary Information"]'; $errors = null; $parsed = Tag::parse($unparsedTag, $errors); echo "errors: "; var_dump($errors); $this->assertInstanceof('pgn\\tags\\UknownTag', $parsed); $this->assertSame($uknownTag->get(), $parsed->get()); $this->assertSame($uknownTag->getName(), $parsed->getName()); $this->assertNotNull($errors); $this->assertEquals(0, count($errors)); }