/** * @dataProvider provideNameCases */ public function testName($expected, $new, $input) { $tag = new Tag(new Line($input)); $this->assertSame($expected, $tag->getName()); if ('other' === $expected) { $this->setExpectedException('RuntimeException', 'Cannot set name on unknown tag'); } $tag->setName($new); $this->assertSame($new, $tag->getName()); }
/** * @dataProvider provideNameCases */ public function testName($expected, $input) { $tag = new Tag($input); $this->assertSame($expected, $tag->getName()); }