Skip to content

Commit a67ddd9

Browse files
committed
add missing test for StringDescription:: toString
1 parent f8b1c01 commit a67ddd9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/Hamcrest/StringDescriptionTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,4 +162,10 @@ public function testSelfDescribingObjectsCanBeAppendedAsIterators()
162162
$this->_description->appendList('@start@', '@sep@ ', '@end@', $items->getIterator());
163163
$this->assertEquals('@start@foo@sep@ bar@end@', (string) $this->_description);
164164
}
165+
166+
public function testToStringAppendsSelfDescribing()
167+
{
168+
$description = $this->_description->toString(new \Hamcrest\SampleSelfDescriber('foo'));
169+
$this->assertEquals('foo', $description);
170+
}
165171
}

0 commit comments

Comments
 (0)