Brak opisu

BaseMatcherTest.php 535B

123456789101112131415161718192021222324
  1. <?php
  2. namespace Hamcrest;
  3. /* Test-specific subclass only */
  4. class BaseMatcherTest extends \Hamcrest\BaseMatcher
  5. {
  6. public function matches($item)
  7. {
  8. throw new \RuntimeException();
  9. }
  10. public function describeTo(\Hamcrest\Description $description)
  11. {
  12. $description->appendText('SOME DESCRIPTION');
  13. }
  14. public function testDescribesItselfWithToStringMethod()
  15. {
  16. $someMatcher = new \Hamcrest\SomeMatcher();
  17. $this->assertEquals('SOME DESCRIPTION', (string) $someMatcher);
  18. }
  19. }