comparison vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php @ 2:5311817fb629

Theme updates
author Chris Cannam
date Tue, 10 Jul 2018 13:19:18 +0000
parents
children
comparison
equal deleted inserted replaced
1:0b0e5f3b1e83 2:5311817fb629
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
11 namespace SebastianBergmann\CodeUnitReverseLookup;
12
13 use PHPUnit\Framework\TestCase;
14
15 /**
16 * @covers SebastianBergmann\CodeUnitReverseLookup\Wizard
17 */
18 class WizardTest extends TestCase
19 {
20 /**
21 * @var Wizard
22 */
23 private $wizard;
24
25 protected function setUp()
26 {
27 $this->wizard = new Wizard;
28 }
29
30 public function testMethodCanBeLookedUp()
31 {
32 $this->assertEquals(
33 __METHOD__,
34 $this->wizard->lookup(__FILE__, __LINE__)
35 );
36 }
37
38 public function testReturnsFilenameAndLineNumberAsStringWhenNotInCodeUnit()
39 {
40 $this->assertEquals(
41 'file.php:1',
42 $this->wizard->lookup('file.php', 1)
43 );
44 }
45 }