comparison vendor/sebastian/code-unit-reverse-lookup/tests/WizardTest.php @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents
children
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
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 }