WizardTest.php 942 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /*
  3. * This file is part of code-unit-reverse-lookup.
  4. *
  5. * (c) Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace SebastianBergmann\CodeUnitReverseLookup;
  11. /**
  12. * @covers SebastianBergmann\CodeUnitReverseLookup\Wizard
  13. */
  14. class WizardTest extends \PHPUnit_Framework_TestCase
  15. {
  16. /**
  17. * @var Wizard
  18. */
  19. private $wizard;
  20. protected function setUp()
  21. {
  22. $this->wizard = new Wizard;
  23. }
  24. public function testMethodCanBeLookedUp()
  25. {
  26. $this->assertEquals(
  27. __METHOD__,
  28. $this->wizard->lookup(__FILE__, __LINE__)
  29. );
  30. }
  31. public function testReturnsFilenameAndLineNumberAsStringWhenNotInCodeUnit()
  32. {
  33. $this->assertEquals(
  34. 'file.php:1',
  35. $this->wizard->lookup('file.php', 1)
  36. );
  37. }
  38. }