DuplicateHeadersExceptionSpec.php 644 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace spec\Ddeboer\DataImport\Exception;
  3. use PhpSpec\ObjectBehavior;
  4. class DuplicateHeadersExceptionSpec extends ObjectBehavior
  5. {
  6. function let()
  7. {
  8. $this->beConstructedWith(['header1', 'header2']);
  9. }
  10. function it_is_initializable()
  11. {
  12. $this->shouldHaveType('Ddeboer\DataImport\Exception\DuplicateHeadersException');
  13. }
  14. function it_is_a_reader_exception()
  15. {
  16. $this->shouldHaveType('Ddeboer\DataImport\Exception\ReaderException');
  17. }
  18. function it_has_a_message()
  19. {
  20. $this->getMessage()->shouldReturn('File contains duplicate headers: header1, header2');
  21. }
  22. }