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
11namespace SebastianBergmann\CodeUnitReverseLookup;
12
13use PHPUnit\Framework\TestCase;
14
15/**
16 * @covers SebastianBergmann\CodeUnitReverseLookup\Wizard
17 */
18class 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}
46