123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- namespace SebastianBergmann\CodeUnitReverseLookup;
- use PHPUnit\Framework\TestCase;
- class WizardTest extends TestCase
- {
-
- private $wizard;
- protected function setUp()
- {
- $this->wizard = new Wizard;
- }
- public function testMethodCanBeLookedUp()
- {
- $this->assertEquals(
- __METHOD__,
- $this->wizard->lookup(__FILE__, __LINE__)
- );
- }
- public function testReturnsFilenameAndLineNumberAsStringWhenNotInCodeUnit()
- {
- $this->assertEquals(
- 'file.php:1',
- $this->wizard->lookup('file.php', 1)
- );
- }
- }
|