NegativeCycleExceptionTest.php 540 B

12345678910111213141516171819
  1. <?php
  2. use Fhaculty\Graph\Walk;
  3. use Fhaculty\Graph\Exception\NegativeCycleException;
  4. class NegativeCycleExceptionTest extends TestCase
  5. {
  6. public function testConstructor()
  7. {
  8. $cycle = $this->getMockBuilder('Fhaculty\Graph\Walk')
  9. ->disableOriginalConstructor()
  10. ->getMock();
  11. $exception = new NegativeCycleException('test', 0, null, $cycle);
  12. $this->assertEquals('test', $exception->getMessage());
  13. $this->assertEquals($cycle, $exception->getCycle());
  14. }
  15. }