/** * @dataProvider provideRoles * * @param Visitor\Role $role */ public function testVisitSomeRole(Visitor\Role $role) { $role->accept($this->visitor); $this->assertSame($role, $this->visitor->getVisited()[0]); }
/** * @dataProvider getRole */ public function testVisitSomeRole(Visitor\Role $role, $expect) { $this->expectOutputString($expect); $role->accept($this->visitor); }